Expand description
Library to create dot directories in common system places.
It’s essentially a wrapper around the dirs crate that allows you to create dot directories
(e.g. /home/user/.project-name) in common places (e.g. Home dir, Config dir etc.) to store program data and configs.
You can also create them in custom locations
§Examples
use dotstore;
fn main() -> std::io::Result<()> {
// Create a new directory called `/home/user/.barracuda`
// The `.` is automatically appended
let project_dir = dotstore::home_store("barracuda")?;
// Create a new directory called `/home/user/.config/.editor`
let editor_dir = dotstore::config_store("editor")?;
// Create a new directory called `/home/user/workspace/middle-earth/.eregion`
let custom_dir = dotstore::custom_store("/home/user/workspace/middle-earth", "eregion")?;
Ok(())
}Functions§
- audio_
store - Creates a new dot directory in the systems Audio path (See
dirs::audio_dir) - cache_
store - Creates a new dot directory in the systems Cache path (See
dirs::cache_dir) - config_
store - Creates a new dot directory in the systems Config path (See
dirs::config_dir) - custom_
store - Create a new dot directory in a custom location of your choosing.
- data_
store - Creates a new dot directory in the systems Data path (See
dirs::data_dir) - desktop_
store - Creates a new dot directory in the systems Desktop path (See
dirs::desktop_dir) - document_
store - Creates a new dot directory in the systems Document path (See
dirs::document_dir) - download_
store - Creates a new dot directory in the systems Download path (See
dirs::download_dir) - executable_
store - Creates a new dot directory in the systems Executable path (See
dirs::executable_dir) - font_
store - Creates a new dot directory in the systems Font path (See
dirs::font_dir) - home_
store - Creates a new dot directory in the systems Home path (See
dirs::home_dir) - local_
config_ store - Creates a new dot directory in the systems local Config path (See
dirs::config_local_dir) - local_
data_ store - Creates a new dot directory in the systems local Data path (See
dirs::data_local_dir) - picture_
store - Creates a new dot directory in the systems Picture path (See
dirs::picture_dir) - preference_
store - Creates a new dot directory in the systems Preference path (See
dirs::picture_dir) - public_
store - Creates a new dot directory in the systems Public path (See
dirs::public_dir) - runtime_
store - Creates a new dot directory in the systems Runtime path (See
dirs::runtime_dir) - state_
store - Creates a new dot directory in the systems State path (See
dirs::runtime_dir) - template_
store - Creates a new dot directory in the systems Template path (See
dirs::template_dir) - video_
store - Creates a new dot directory in the systems Video path (See
dirs::video_dir)