Trait unidirs::Directories[][src]

pub trait Directories {
    fn cache_dir(&self) -> &Utf8Path;
fn config_dir(&self) -> &Utf8Path;
fn data_dir(&self) -> &Utf8Path; }
Expand description

Common directories that are provided by all *Dirs structures. This can be used as an alternative to UnifiedDirs to abstract over the underlying provider implementation.

Note that on some platforms the different directories can end up being the same.

Required methods

The cache directory is a location where an application can save any temporary data. The contents can potentially be deleted by the system at any time. Therefore, the application must be able to work without these files or be able to re-create them.

The config directory is where an application’s settings are stored. These are usually created by the user and loaded once at startup of the application.

The data directory hold an application’s state data, like a database. The folder is expected to persist during the normal runtime of the OS.

Implementors