Jabacat's Easy Config
JEC-py | JEC-rs | JEC-go | JEC-c++ | JEC-kt | JEC-c | JEC-zig | JEC-ts
ConfigFile
- Exists
- Remove
- Create
- FromHome
ConfigDir
- Exists
- Remove
- Create
- FromHome
conf := ConfigFile{"./test.conf"}
if !conf.Exists() {
conf.Create()
}
dir := ConfigDir{"./config/"}
if !dir.Exists() {
dir.Create()
}
conf.Remove()
dir.Remove()
conf = ConfigFile{""}.FromHome("./test.conf")
strings.Contains(conf.path, "home") // true at /home/user/test.conf