ContextWrapper.DataDir Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the absolute path to the directory on the filesystem for this app in the storage area associated with this context.
public override Java.IO.File? DataDir { [Android.Runtime.Register("getDataDir", "()Ljava/io/File;", "GetGetDataDirHandler", ApiSince=24)] get; }
[<get: Android.Runtime.Register("getDataDir", "()Ljava/io/File;", "GetGetDataDirHandler", ApiSince=24)>]
member this.DataDir : Java.IO.File
Property Value
The absolute path to the directory on the filesystem for this app in the storage area associated with this context.
- Attributes
Remarks
Returns the absolute path to the directory on the filesystem for this app in the storage area associated with this context. Apps should not use this path directly; they should instead use getFilesDir() , getCacheDir() , getDir(String,int) , or other storage APIs on this class. The returned path may change over time if the calling app is moved to an adopted storage device, so only relative paths should be persisted. No additional permissions are required for the calling app to read or write files under the returned path.
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.
Java documentation for android.content.ContextWrapper.getDataDir().