cachedir 0.1.0

A library that helps with cache directories creation in a system-agnostic way. **Note**: even though the crate is at version `0.1`, it should be stable and its API is not expected to change soon.
Documentation

cachedir

Build Status Build status

Documentation


A Rust library that helps with cache directories creation in a system-agnostic way.

Note: even though the crate is at version 0.1, it should be stable and its API is not expected to change soon.

Usage

Add this to your Cargo.toml:

[dependencies]
cachedir = "0.1"

Example

extern crate cachedir;

use cachedir::CacheDirConfig;

fn main() {
    let cache_dir = CacheDirConfig::new("CacheName")
                                   .get_cache_dir()
                                   .unwrap();

    println!("{}", cache_dir.display());
}

This creates CacheName into the user's cache directory. For more information on the types of caches and code examples, please check the documentation.

License

cachedir is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for more details.