public class Environment extends Object
Java.lang.Object
↳ Android.os.Environment
类概述
提供访问环境变量.
摘要
常量
String |
MEDIA_BAD_REMOVAL |
在没有正确卸载SDCard之前移除了 |
String |
MEDIA_CHECKING |
正在磁盘检查 |
String |
MEDIA_MOUNTED |
已经挂载并且拥有可读可写权限 |
String |
MEDIA_MOUNTED_READ_ONLY |
已经挂载,但只拥有可读权限 |
String |
MEDIA_NOFS |
对象空白,或者文件系统不支持 |
String |
MEDIA_REMOVED |
已经移除扩展设备 |
String |
MEDIA_SHARED |
如果SDCard未挂载,并通过USB大容量存储共享 |
String |
MEDIA_UNMOUNTABLE |
不可以挂载任何扩展设备 |
String |
MEDIA_UNMOUNTED |
已经卸载 |
字段
public static String |
DIRECTORY_ALARMS |
|
public static String |
DIRECTORY_DCIM |
|
public static String |
DIRECTORY_DOWNLOADS |
|
public static String |
DIRECTORY_MOVIES |
|
public static String |
DIRECTORY_MUSIC |
|
public static String |
DIRECTORY_NOTIFICATIONS |
|
public static String |
DIRECTORY_PICTURES |
|
public static String |
DIRECTORY_PODCASTS |
|
public static String |
DIRECTORY_RINGTONES |
|
公有构造函数
Environment()
公有方法
static File |
getDataDirectory() |
Gets the Android data directory. 返回Data的目录 |
static File |
getDownloadCacheDirectory() |
Gets the Android Download/Cache content directory. 返回下载缓冲区目录 |
static File |
getExternalStorageDirectory() |
Gets the Android external storage directory. 返回扩展存储区目录(SDCard) |
static File |
getExternalStoragePublicDirectory(String type) |
Get a top-level public external storage directory for placing files of a particular type. 返回一个高端的公用的外部存储器目录来摆放某些类型的文件(来自网上) |
static String |
getExternalStorageState() |
Gets the current state of the primary "external" storage device. 返回外部存储设备的当前状态 |
static File |
getRootDirectory() |
Gets the Android root directory. 返回Android的根目录 |
static boolean |
isExternalStorageRemovable() |
Returns whether the primary "external" storage device is removable. 返回外部存储设备是否可移除 |
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)