#[non_exhaustive]pub enum PrivateDir {
Data,
Cache,
NoBackupData,
}
Expand description
The application specific directory.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Data
The application specific persistent-data directory.
Files stored in this directory are included in Android Auto Backup.
The system prevents other apps and user from accessing these locations. In cases where the device is rooted or the user has special permissions, the user may be able to access this.
These files will be deleted when the app is uninstalled and may also be deleted at the user’s request.
e.g. /data/user/0/{app-package-name}/files
https://developer.android.com/reference/android/content/Context#getFilesDir()
Cache
The application specific cache directory.
Files stored in this directory are not included in Android Auto Backup.
The system prevents other apps and user from accessing these locations. In cases where the device is rooted or the user has special permissions, the user may be able to access this.
These files will be deleted when the app is uninstalled and may also be deleted at the user’s request. In addition, the system will automatically delete files in this directory as disk space is needed elsewhere on the device.
e.g. /data/user/0/{app-package-name}/cache
https://developer.android.com/reference/android/content/Context#getCacheDir()
NoBackupData
The application specific persistent-data directory.
This is similar to PrivateDir::Data
.
But files stored in this directory are not included in Android Auto Backup.
The system prevents other apps and user from accessing these locations. In cases where the device is rooted or the user has special permissions, the user may be able to access this.
These files will be deleted when the app is uninstalled and may also be deleted at the user’s request.
e.g. /data/user/0/{app-package-name}/no_backup
https://developer.android.com/reference/android/content/Context#getNoBackupFilesDir()
Trait Implementations§
Source§impl Clone for PrivateDir
impl Clone for PrivateDir
Source§fn clone(&self) -> PrivateDir
fn clone(&self) -> PrivateDir
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more