standard_paths

Crates.iostandard_paths
lib.rsstandard_paths
version2.1.0
sourcesrc
created_at2017-12-08 06:55:41.193854
updated_at2023-08-03 07:59:32.495299
descriptionA port of QStandardPaths class which provides methods for accessing standard paths on the local filesystem (config, cache, user directories and etc.).
homepage
repositoryhttps://github.com/mentaljam/standard_paths
max_upload_size
id42132
size57,655
Petr Tsymbarovich (mentaljam)

documentation

https://docs.rs/standard_paths

README

Standard Paths

A Rust library providing methods for accessing standard paths on the local filesystem (config, cache, user directories and etc.).

It's a port of QStandardPaths class of the Qt framework.

Crates Version Crates Downloads Documentation

Currently implemented for Linux and Windows

macOS support

macOS is currently unsupported. If you want to help with macOS feel free to contribute!

Usage

Cargo.toml

[dependencies]
standard_paths = "^2.0"

main.rs

use standard_paths::{LocationType, StandardPaths};

fn main() {
    let sp = StandardPaths::new("app", "org");
    println!("{:?}", sp.writable_location(LocationType::AppLocalDataLocation));
}
Commit count: 84

cargo fmt