JEC-rs
·76 words·1 min
JEC-rs#
Jabacat’s Easy Config
JEC-py | JEC-rs | JEC-go | JEC-c | JEC-c++ | JEC-zig | JEC-ts
API #
ConfigFile
- exists
- remove
- create
- from_home
ConfigDir
- exists
- remove
- create
- from_home
Usage #
let conf = ConfigFile {
path: "./test.yml".to_string(),
};
if !conf.exists() {
conf.create();
}
conf.remove();
let conf = ConfigDir {
path: "./config/".to_string(),
};
if !conf.exists() {
conf.create();
}
conf.remove();
let conf = ConfigFile::from_home("./test.yml".to_string());
let conf = ConfigDir::from_home("./config/".to_string());