4 releases (1 stable)

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

#68 in Filesystem

Download history 128/week @ 2019-11-27 63/week @ 2019-12-04 37/week @ 2019-12-11 337/week @ 2019-12-18 115/week @ 2019-12-25 425/week @ 2020-01-01 21/week @ 2020-01-08 29/week @ 2020-01-15 7/week @ 2020-01-22 16/week @ 2020-01-29 8/week @ 2020-02-05 38/week @ 2020-02-12 65/week @ 2020-02-19 298/week @ 2020-02-26 109/week @ 2020-03-04 9/week @ 2020-03-11

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

MIT/Apache

16KB
244 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