Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 880 Bytes

README.md

File metadata and controls

45 lines (35 loc) · 880 Bytes

JEC-rs Rust

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());