#[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. But you should not rely on this. The cache should be explicitly cleared by yourself.
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 moreSource§impl Debug for PrivateDir
impl Debug for PrivateDir
Source§impl<'de> Deserialize<'de> for PrivateDir
impl<'de> Deserialize<'de> for PrivateDir
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for PrivateDir
impl Hash for PrivateDir
Source§impl PartialEq for PrivateDir
impl PartialEq for PrivateDir
Source§impl Serialize for PrivateDir
impl Serialize for PrivateDir
impl Copy for PrivateDir
impl Eq for PrivateDir
impl StructuralPartialEq for PrivateDir
Auto Trait Implementations§
impl Freeze for PrivateDir
impl RefUnwindSafe for PrivateDir
impl Send for PrivateDir
impl Sync for PrivateDir
impl Unpin for PrivateDir
impl UnwindSafe for PrivateDir
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
Source§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.