docs.rs failed to build xdg-1.0.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
xdg-2.5.2
rust-xdg
rust-xdg is a library that makes it easy to follow the X Desktop Group standards for data, configuration, cache and runtime directories.
Installation
Add the following to Cargo.toml
:
[]
= "*"
Examples
To store configuration:
extern crate xdg;
let xdg_dirs = new;
let mut file = try!;
try!;
The myapp.ini
file will appear in the proper location for desktop
configuration files, most likely ~/.config/myapp/config.ini
.
The leading directories will be automatically created.
To retrieve supplementary data:
let config_path = xdg_dirs.find_config_file
.expect;
let mut file = try!;
let mut data = String new;
try!;
The logo.png
will be searched in the proper locations for
supplementary data files, most likely ~/.local/share/myapp/logo.png
,
then /usr/local/share/myapp/logo.png
and /usr/share/myapp/logo.png
.
License
rust-xdg is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT for details.