Freigeben über


Environment.InvokeIsExternalStorageEmulated(File) Method

Definition

Returns whether the shared/external storage media at the given path is emulated.

[Android.Runtime.Register("isExternalStorageEmulated", "(Ljava/io/File;)Z", "")]
public static bool InvokeIsExternalStorageEmulated (Java.IO.File path);
[<Android.Runtime.Register("isExternalStorageEmulated", "(Ljava/io/File;)Z", "")>]
static member InvokeIsExternalStorageEmulated : Java.IO.File -> bool

Parameters

path
File

Returns

Attributes

Exceptions

if the path is not a valid storage device.

Remarks

Returns whether the shared/external storage media at the given path is emulated.

The contents of emulated storage devices are backed by a private user data partition, which means there is little benefit to apps storing data here instead of the private directories returned by Context#getFilesDir(), etc.

This returns true when emulated storage is backed by either internal storage or an adopted storage device.

Java documentation for android.os.Environment.isExternalStorageEmulated(java.io.File).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to