[−][src]Trait etcetera::app_strategy::AppStrategy
Allows applications to retrieve the paths of configuration, data and cache directories specifically for them.
Associated Types
type CreationError
The error type returned by new
.
Required methods
fn new(args: AppStrategyArgs) -> Result<Self, Self::CreationError>
The constructor requires access to some basic information about your application.
fn config_dir(&self) -> PathBuf
Gets the configuration directory for your application.
fn data_dir(&self) -> PathBuf
Gets the data directory for your application.
fn cache_dir(&self) -> PathBuf
Gets the cache directory for your application.
Provided methods
fn config_file<FileName: AsRef<OsStr>>(&self, file_name: FileName) -> PathBuf
Constructs a path inside your application’s configuration directory to which a file name of your choice has been appended.
fn data_file<FileName: AsRef<OsStr>>(&self, file_name: FileName) -> PathBuf
Constructs a path inside your application’s data directory to which a file name of your choice has been appended.
fn cache_file<FileName: AsRef<OsStr>>(&self, file_name: FileName) -> PathBuf
Constructs a path inside your application’s cache directory to which a file name of your choice has been appended.