A library for building applications natively on Linux/Redox/macOS/Windows. It currently provides...
dirs
ini
config filesThis crate utilizes the dirs
crate and re-exports it for easy access.
```rust kettle::app!("this_APP")
fn main() { let configdir = THISAPP.configdir(); //$HOME/.config/thisAPP/ let datadir = THISAPP.datadir(); //$HOME/.local/share/thisAPP/
// default config file
THIS_APP.config()
.set("view", Some("horizontal"));
let view = THIS_APP.config()
.get("view");
assert_eq!(view.unwrap(), Some("horizontal".to_string()));
// named config file
THIS_APP.config_file("admin_profiles")
.section("dev") // setting `ini` sections is possible
.set("view", None);
let admin_view = THIS_APP.config_file("admin_profiles")
.section("dev");
.get("view");
assert_eq!(admin_view.unwrap(), None);
} ```
Licensed under either of Apache License, Version 2.0 or MIT license at your option.