語言

Context.FilesDir 屬性

定義

回傳檔案系統中存放檔案 OpenFileOutput(String, FileCreationMode) 的目錄的絕對路徑。

public abstract Java.IO.File? FilesDir { [Android.Runtime.Register("getFilesDir", "()Ljava/io/File;", "GetGetFilesDirHandler")] get; }
[<get: Android.Runtime.Register("getFilesDir", "()Ljava/io/File;", "GetGetFilesDirHandler")>]
member this.FilesDir : Java.IO.File

屬性值

回傳檔案系統中存放 openFileOutput(String, int) 檔案的絕對路徑。 若呼叫應用程式移至已採用的儲存裝置,回傳路徑可能會隨時間改變,因此僅應保留相對路徑。 呼叫應用程式在回傳路徑下讀寫檔案不需要額外權限。 回傳檔案 存放應用程式檔案的目錄路徑。

屬性

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

Java 文件 android.content.Context.getFilesDir()

適用於

另請參閱

  • <xref:Android.Content.Context.OpenFileOutput(System.String%2c+Android.Content.FileCreationMode)>
  • GetFileStreamPath(String)
  • <xref:Android.Content.Context.GetDir(System.String%2c+Android.Content.FileCreationMode)>