Context.FilesDir 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳檔案系統中存放檔案 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)>