1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! # etc
//!
//! [](https://github.com/clearloop/etc)
//! [](https://crates.io/crates/etc)
//! [](https://docs.rs/etc/)
//! [](https://deps.rs/repo/github/clearloop/etc)
//! [](https://crates.io/crates/etc)
//! [](https://choosealicense.com/licenses/mit/)
//!
//! It's time to bundle etc for your awesome project!
//!
//! ```rust
//! use etc::{Etc, FileSystem, Read, Write};
//!
//! fn main() {
//! // config root path
//! let mut dir = dirs::home_dir().unwrap();
//! dir.push(".etc.io");
//!
//! // generate ~/.etc.io dir
//! let etc = Etc::new(&dir).unwrap();
//! let hello = etc.open("hello.md").unwrap();
//!
//! // input and output
//! assert!(hello.write(b"hello, world!\n").is_ok());
//! assert_eq!(hello.read().unwrap(), b"hello, world!\n");
//!
//! // remove hello.md
//! assert!(etc.rm("hello.md").is_ok());
//!
//! // hello.md has been removed
//! let mut hello_md = dir.clone();
//! hello_md.push("hello.md");
//! assert!(!hello_md.exists());
//!
//! // remove all
//! assert!(etc.drain().is_ok());
//! assert!(!dir.exists());
//! }
//! ```
//!
//! ## LICENSE
//!
//! MIT
pub use crate::;
// #[cfg(feature = "derive")]
// pub use etc_derive::*;
pub use dirs;