#standard #paths #location #directory #storage

standard_paths

A port of QStandardPaths class which provides methods for accessing standard paths on the local filesystem (config, cache, user directories and etc.)

10 releases (2 stable)

Uses new Rust 2021

1.1.0 Mar 24, 2022
1.0.0 Mar 23, 2022
0.4.6 Dec 24, 2017
0.3.1 Dec 8, 2017

#118 in Filesystem

Download history 56/week @ 2022-08-09 54/week @ 2022-08-16 31/week @ 2022-08-23 20/week @ 2022-08-30 33/week @ 2022-09-06 24/week @ 2022-09-13 33/week @ 2022-09-20 38/week @ 2022-09-27 47/week @ 2022-10-04 20/week @ 2022-10-11 41/week @ 2022-10-18 32/week @ 2022-10-25 39/week @ 2022-11-01 38/week @ 2022-11-08 23/week @ 2022-11-15 45/week @ 2022-11-22

156 downloads per month
Used in 2 crates

MIT license

41KB
811 lines

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 = "^1.0"

main.rs

extern crate standard_paths;

use standard_paths::*;
use standard_paths::LocationType::*;

fn main() {
    let sp = StandardPaths::new("app", "org");
    println!("App data location: {:?}", sp.writable_location(AppLocalDataLocation));
}

Dependencies

~64KB