Enum tauri::api::path::BaseDirectory
source · #[non_exhaustive]#[repr(u16)]pub enum BaseDirectory {
Show 25 variants
Audio = 1,
Cache = 2,
Config = 3,
Data = 4,
LocalData = 5,
Desktop = 6,
Document = 7,
Download = 8,
Executable = 9,
Font = 10,
Home = 11,
Picture = 12,
Public = 13,
Runtime = 14,
Template = 15,
Video = 16,
Resource = 17,
App = 18,
Log = 19,
Temp = 20,
AppConfig = 21,
AppData = 22,
AppLocalData = 23,
AppCache = 24,
AppLog = 25,
}
Expand description
A base directory to be used in resolve_path
.
The base directory is the optional root of a file system operation. If informed by the API call, all paths will be relative to the path of the given directory.
For more information, check the dirs_next
documentation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Audio = 1
The Audio directory.
Cache = 2
The Cache directory.
Config = 3
The Config directory.
Data = 4
The Data directory.
LocalData = 5
The LocalData directory.
Desktop = 6
The Desktop directory.
Document = 7
The Document directory.
Download = 8
The Download directory.
Executable = 9
The Executable directory.
Font = 10
The Font directory.
Home = 11
The Home directory.
Picture = 12
The Picture directory.
Public = 13
The Public directory.
Runtime = 14
The Runtime directory.
Template = 15
The Template directory.
Video = 16
The Video directory.
Resource = 17
The Resource directory.
App = 18
BaseDirectory::AppConfig
or BaseDirectory::AppData` instead.The default app config directory.
Resolves to BaseDirectory::Config
/{bundle_identifier}
.
Log = 19
BaseDirectory::AppLog
instead.The default app log directory.
Resolves to BaseDirectory::Home
/Library/Logs/{bundle_identifier}
on macOS
and BaseDirectory::Config
/{bundle_identifier}/logs
on linux and Windows.
Temp = 20
A temporary directory.
Resolves to temp_dir
.
AppConfig = 21
The default app config directory.
Resolves to BaseDirectory::Config
/{bundle_identifier}
.
AppData = 22
The default app data directory.
Resolves to BaseDirectory::Data
/{bundle_identifier}
.
AppLocalData = 23
The default app local data directory.
Resolves to BaseDirectory::LocalData
/{bundle_identifier}
.
AppCache = 24
The default app cache directory.
Resolves to BaseDirectory::Cache
/{bundle_identifier}
.
AppLog = 25
The default app log directory.
Resolves to BaseDirectory::Home
/Library/Logs/{bundle_identifier}
on macOS
and BaseDirectory::Config
/{bundle_identifier}/logs
on linux and Windows.
Implementations§
source§impl BaseDirectory
impl BaseDirectory
sourcepub fn variable(self) -> &'static str
pub fn variable(self) -> &'static str
Gets the variable that represents this BaseDirectory
for string paths.
sourcepub fn from_variable(variable: &str) -> Option<Self>
pub fn from_variable(variable: &str) -> Option<Self>
Gets the BaseDirectory
associated with the given variable, or None
if the variable doesn’t match any.
Trait Implementations§
source§impl Clone for BaseDirectory
impl Clone for BaseDirectory
source§fn clone(&self) -> BaseDirectory
fn clone(&self) -> BaseDirectory
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more