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

#1375 in Filesystem

Download history 136/week @ 2024-07-21 139/week @ 2024-07-28 122/week @ 2024-08-04 161/week @ 2024-08-11 102/week @ 2024-08-18 172/week @ 2024-08-25 135/week @ 2024-09-01 115/week @ 2024-09-08 106/week @ 2024-09-15 128/week @ 2024-09-22 114/week @ 2024-09-29 19/week @ 2024-10-06 74/week @ 2024-10-13 76/week @ 2024-10-20 93/week @ 2024-10-27 89/week @ 2024-11-03

332 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