pub struct AppPaths(/* private fields */);Expand description
Immutable snapshot of standard process, application, and user directories.
Application-owned directories are scoped by the package identifier. User directories and the operating-system temporary directory are not created or otherwise mutated during resolution.
Implementations§
Source§impl AppPaths
impl AppPaths
Sourcepub fn resolve(identifier: &str) -> Result<Self>
pub fn resolve(identifier: &str) -> Result<Self>
Resolve paths once for the current process without creating any directories.
pub fn executable(&self) -> &Path
pub fn executable_dir(&self) -> &Path
pub fn resource_dir(&self) -> &Path
pub fn home_dir(&self) -> Option<&Path>
pub fn config_dir(&self) -> Option<&Path>
pub fn data_dir(&self) -> Option<&Path>
pub fn local_data_dir(&self) -> Option<&Path>
pub fn cache_dir(&self) -> Option<&Path>
pub fn log_dir(&self) -> Option<&Path>
pub fn runtime_dir(&self) -> Option<&Path>
pub fn temp_dir(&self) -> &Path
pub fn audio_dir(&self) -> Option<&Path>
pub fn desktop_dir(&self) -> Option<&Path>
pub fn document_dir(&self) -> Option<&Path>
pub fn download_dir(&self) -> Option<&Path>
pub fn picture_dir(&self) -> Option<&Path>
pub fn video_dir(&self) -> Option<&Path>
pub fn with_resource_dir(self, path: impl Into<PathBuf>) -> Self
pub fn with_config_dir(self, path: Option<impl Into<PathBuf>>) -> Self
pub fn with_data_dir(self, path: Option<impl Into<PathBuf>>) -> Self
pub fn with_local_data_dir(self, path: Option<impl Into<PathBuf>>) -> Self
pub fn with_cache_dir(self, path: Option<impl Into<PathBuf>>) -> Self
pub fn with_log_dir(self, path: Option<impl Into<PathBuf>>) -> Self
pub fn with_runtime_dir(self, path: Option<impl Into<PathBuf>>) -> Self
pub fn with_temp_dir(self, path: impl Into<PathBuf>) -> Self
Trait Implementations§
impl Eq for AppPaths
impl StructuralPartialEq for AppPaths
Auto Trait Implementations§
impl Forget for AppPaths
impl Freeze for AppPaths
impl Move for AppPaths
impl RefUnwindSafe for AppPaths
impl Send for AppPaths
impl Sync for AppPaths
impl Unpin for AppPaths
impl UnsafeUnpin for AppPaths
impl UnwindSafe for AppPaths
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
Mutably borrows from an owned value. Read more