添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
健壮的野马  ·  Extracting the prop ...·  1 月前    · 
私奔的青椒  ·  头文件 (C++) | Microsoft ...·  9 月前    · 
还单身的熊猫  ·  VBA之MSForms.DataObject ...·  1 年前    · 

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
[Android.Runtime.Register("getExternalStoragePublicDirectory", "(Ljava/lang/String;)Ljava/io/File;", "")]
public static Java.IO.File? GetExternalStoragePublicDirectory (string? type);
[<Android.Runtime.Register("getExternalStoragePublicDirectory", "(Ljava/lang/String;)Ljava/io/File;", "")>]
static member GetExternalStoragePublicDirectory : string -> Java.IO.File

Parameters

The type of storage directory to return. Should be one of #DIRECTORY_MUSIC , #DIRECTORY_PODCASTS , #DIRECTORY_RINGTONES , #DIRECTORY_ALARMS , #DIRECTORY_NOTIFICATIONS , #DIRECTORY_PICTURES , #DIRECTORY_MOVIES , #DIRECTORY_DOWNLOADS , #DIRECTORY_DCIM , or #DIRECTORY_DOCUMENTS . May not be null.

Returns

Returns the File path for the directory. Note that this directory may not yet exist, so you must make sure it exists before using it such as with File#mkdirs File.mkdirs() .

Attributes
RegisterAttribute

Remarks

Get a top-level shared/external storage directory for placing files of a particular type. This is where the user will typically place and manage their own files, so you should be careful about what you put here to ensure you don't erase their files or get in the way of their own organization.

On devices with multiple users (as described by UserManager ), each user has their own isolated shared storage. Applications only have access to the shared storage for the user they're running as.

Here is an example of typical code to manipulate a picture on the public shared storage:

{

Java documentation for android.os.Environment.getExternalStoragePublicDirectory(java.lang.String) .

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.