4 releases (1 stable)

Uses old Rust 2015

1.0.0 Feb 28, 2016
0.2.2 Aug 17, 2015
0.2.1 May 25, 2015
0.2.0 May 25, 2015

#9 in #basedir

Download history 104/week @ 2023-12-10 149/week @ 2023-12-17 141/week @ 2023-12-24 44/week @ 2023-12-31 133/week @ 2024-01-07 134/week @ 2024-01-14 95/week @ 2024-01-21 65/week @ 2024-01-28 129/week @ 2024-02-04 131/week @ 2024-02-11 119/week @ 2024-02-18 141/week @ 2024-02-25 124/week @ 2024-03-03 142/week @ 2024-03-10 161/week @ 2024-03-17 207/week @ 2024-03-24

646 downloads per month
Used in 49 crates (3 directly)

MIT/Apache

16KB
243 lines

xdg-basedir

Build Status

Documentation

xdg-basedir is a utility library to make conforming to the XDG basedir specification easier.

#Example

#![cfg(unix)]
extern crate xdg_basedir;

#![cfg(unix)]
use xdg_basedir::*;
use std::path::PathBuf;
...
let data_home: PathBuf = try!(get_data_home());
...

Unstable features:

  • Test runtime directory: A function to check if a directory satisfies the XDG spec's requirements of a runtime directory.

The default build of xdg-basedir does not use any unstable libstd features. To enable them, you'll need to use the nightly build of rustc and build xdg-basedir with the 'unstable' feature toggle.

[dependencies.xdg-basedir]
version = "0.2.2"
features = ["unstable"]

Alternate implementation and some initial source borrowed from rust-xdg. The APIs provided by rust-xdg and xdg-basedir are different.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

No runtime deps

Features