Most visited

Recently visited

EnvironmentCompat

public final class EnvironmentCompat
extends Object

java.lang.Object
    android.support.v4.os.EnvironmentCompat


Helper用于访问以向后兼容的方式在API级别4之后引入的 Environment功能。

摘要(Summary)

常量(Constants)

String MEDIA_UNKNOWN

未知存储状态,例如路径未被已知存储介质支持时。

公共方法(Public methods)

static String getStorageState(File path)

返回提供给定路径的存储设备的当前状态。

继承方法(Inherited methods)

From class java.lang.Object

常量(Constants)

MEDIA_UNKNOWN

String MEDIA_UNKNOWN

未知存储状态,例如路径未被已知存储介质支持时。

也可以看看:

常量值:“未知”

公共方法(Public methods)

getStorageState

String getStorageState (File path)

返回提供给定路径的存储设备的当前状态。

参数(Parameters)
path File
返回(Returns)
String one of MEDIA_UNKNOWN, MEDIA_REMOVED, MEDIA_UNMOUNTED, MEDIA_CHECKING, MEDIA_NOFS, MEDIA_MOUNTED, MEDIA_MOUNTED_READ_ONLY, MEDIA_SHARED, MEDIA_BAD_REMOVAL, or MEDIA_UNMOUNTABLE.

Hooray!