cachedir
-
[](https://travis-ci.org/lilianmoraru/cachedir)
[](https://ci.appveyor.com/project/lilianmoraru/cachedir/branch/master)
[Documentation](https://docs.rs/cachedir)
---
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`:
```toml
[dependencies]
cachedir = "0.1"
```
## Example
```rust
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.<br/>
For more information on the types of caches and code examples, please check the [documentation](https://docs.rs/cachedir).
## License
`cachedir` is distributed under the terms of both the MIT license and the
Apache License (Version 2.0).
See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for more details.