/**
* Unknown storage state, such as when a path isn't backed by known storage
* media.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_UNKNOWN = "unknown"; 未知
/**
* Storage state if the media is not present.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_REMOVED = "removed";
/**
* Storage state if the media is present but not mounted.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_UNMOUNTED = "unmounted";
/**
* Storage state if the media is present and being disk-checked.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_CHECKING = "checking";
/**
* Storage state if the media is present but is blank or is using an
* unsupported filesystem.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_NOFS = "nofs";
/**
* Storage state if the media is present and mounted at its mount point with
* read/write access.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_MOUNTED = "mounted";
/**
* Storage state if the media is present and mounted at its mount point with
* read-only access.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_MOUNTED_READ_ONLY = "mounted_ro";
/**
* Storage state if the media is present not mounted, and shared via USB
* mass storage.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_SHARED = "shared";
/**
* Storage state if the media was removed before it was unmounted.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_BAD_REMOVAL = "bad_removal";
/**
* Storage state if the media is present but cannot be mounted. Typically
* this happens if the file system on the media is corrupted.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_UNMOUNTABLE = "unmountable";
/**
* Storage state if the media is in the process of being ejected.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_EJECTING = "ejecting";
以上这些状态中
/**
* Storage state if the media is present and mounted at its mount point with
* read/write access.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_MOUNTED = "mounted";
以上的这些状态中只有mounted 状态是同时可读可写的
而
/**
* Storage state if the media is present and mounted at its mount point with
* read-only access.
*
* @see #getExternalStorageState(File)
*/
public static final String MEDIA_MOUNTED_READ_ONLY = "mounted_ro";
查看源码可知,android中的storage state 共有以下几种状态/** * Unknown storage state, such as when a path isn't backed by known storage * media. * * @see #getExternalStorageState(File) */public stati