Struct cap_directories::ProjectDirs [−][src]
pub struct ProjectDirs { /* fields omitted */ }
Expand description
ProjectDirs
computes the cache, config or data directories for a specific
application, which are derived from the standard directories and the name
of the project/organization.
This corresponds to directories_next::ProjectDirs
, except that the
functions create the directories if they don’t exist, open them, and return
Dir
s instead of returning Path
s.
Unlike directories_next::ProjectDirs
, this API has no
ProjectDirs::from_path
, ProjectDirs::path
or
ProjectDirs::project_path
, and the *_dir
functions return Dir
s rather
than Path
s, because absolute paths don’t interoperate well with the
capability model.
Implementations
Creates a ProjectDirs
struct from values describing the project.
This corresponds to directories_next::ProjectDirs::from
.
Ambient Authority
This function makes use of ambient authority to access the project directories.
Returns the project’s cache directory.
This corresponds to directories_next::ProjectDirs::cache_dir
.
Returns the project’s config directory.
This corresponds to directories_next::ProjectDirs::config_dir
.
Returns the project’s data directory.
This corresponds to directories_next::ProjectDirs::data_dir
.
Returns the project’s local data directory.
This corresponds to directories_next::ProjectDirs::data_local_dir
.
Returns the project’s runtime directory.
This corresponds to directories_next::ProjectDirs::runtime_dir
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ProjectDirs
impl Send for ProjectDirs
impl Sync for ProjectDirs
impl Unpin for ProjectDirs
impl UnwindSafe for ProjectDirs
Blanket Implementations
Mutably borrows from an owned value. Read more