共用方式為


ContextWrapper.GetDir(String, FileCreationMode) Method

Definition

Retrieve, creating if needed, a new directory in which the application can place its own custom data files.

[Android.Runtime.Register("getDir", "(Ljava/lang/String;I)Ljava/io/File;", "GetGetDir_Ljava_lang_String_IHandler")]
public override Java.IO.File? GetDir (string? name, Android.Content.FileCreationMode mode);
[<Android.Runtime.Register("getDir", "(Ljava/lang/String;I)Ljava/io/File;", "GetGetDir_Ljava_lang_String_IHandler")>]
override this.GetDir : string * Android.Content.FileCreationMode -> Java.IO.File

Parameters

name
String

Name of the directory to retrieve. This is a directory that is created as part of your application data.

mode
FileCreationMode

Operating mode. Use 0 or Private for the default operation, WorldReadable and WorldWriteable to control permissions.

Returns

Attributes

Remarks

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