logo
pub struct ProjectDirs { /* private fields */ }
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 Dirs instead of returning Paths.

Unlike directories_next::ProjectDirs, this API has no ProjectDirs::from_path, ProjectDirs::path or ProjectDirs::project_path, and the *_dir functions return Dirs rather than Paths, 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.