android.os.Environment

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.

返回外部存储设备是否可移除

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值