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!