語言

ContextWrapper.FilesDir 屬性

定義

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

public override 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.ContextWrapper.getFilesDir()。

適用於