#xdg #basedir

xdg-rs

[This crate is no longer maintained. Please use xdg-basedir instead] Library to help with the XDG basedir spec

13 releases

0.1.4 May 25, 2015
0.1.3 May 16, 2015
0.0.8 Apr 22, 2015
0.0.6 Feb 26, 2015
0.0.4 Dec 11, 2014

#5 in #basedir

Download history 13/week @ 2019-11-27 39/week @ 2019-12-04 34/week @ 2019-12-11 13/week @ 2019-12-25 1/week @ 2020-01-01 25/week @ 2020-01-08 77/week @ 2020-01-15 1/week @ 2020-01-29 1/week @ 2020-02-05 13/week @ 2020-02-12 26/week @ 2020-02-19 26/week @ 2020-02-26 26/week @ 2020-03-04 13/week @ 2020-03-11

94 downloads per month

MIT license

16KB
242 lines

This library has been moved to xdg-basedir.

xdg-rs

Build Status

Documentation

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

#Example

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

#![cfg(unix)]
use xdg;
use std::path::PathBuf;
...
let data_home: PathBuf = try!(xdg::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-rs does not use any unstable libstd features. To enable them, you'll need to use the nightly build of rustc and build xdg-rs with the 'unstable' feature toggle.

[dependencies.xdg-rs]
version = "0.1.3"
features = ["unstable"]

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

No runtime deps