#[non_exhaustive]pub enum AppDir {
Data,
Cache,
PublicMedia,
}Expand description
The directory for the app.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Data
The directory for persistent-data files.
These files will be deleted when the app is uninstalled and may also be deleted at the user’s request.
Please note that, unlike PrivateDir::Data, it may be accessible by other apps or user.
e.g.
/storage/emulated/0/Android/data/{app-package-name}/files/storage/{sd-card-id}/Android/data/{app-package-name}/files
Cache
The directory for cache files.
These files will be deleted when the app is uninstalled and may also be deleted at the user’s request.
Please note that, unlike PrivateDir::Cache, it may be accessible by other apps or user.
e.g.
/storage/emulated/0/Android/data/{app-package-name}/cache/storage/{sd-card-id}/Android/data/{app-package-name}/cache
https://developer.android.com/reference/android/content/Context#getExternalCacheDirs()
PublicMedia
PublicDir of PublicStorage instead.The directory for shared media files to other apps or user.
These files will be deleted when the app is uninstalled and may also be deleted at the user’s request.
For Android 11 (API level 30) or higher,
this has been marked as deprecated.
It still works, but you should consider migrating to PublicDir of PublicStorage.
e.g.
/storage/emulated/0/Android/media/{app-package-name}/storage/{sd-card-id}/Android/media/{app-package-name}
https://developer.android.com/reference/android/content/Context#getExternalMediaDirs()
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppDir
impl<'de> Deserialize<'de> for AppDir
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>,
impl Copy for AppDir
impl Eq for AppDir
impl StructuralPartialEq for AppDir
Auto Trait Implementations§
impl Freeze for AppDir
impl RefUnwindSafe for AppDir
impl Send for AppDir
impl Sync for AppDir
impl Unpin for AppDir
impl UnwindSafe for AppDir
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.