class
Obsctl::Config::ConfigWriter
- Obsctl::Config::ConfigWriter
- Reference
- Object
Overview
Writes config files with backup and atomic-replace semantics.
Defined in:
obsctl/config/config_writer.crInstance Method Summary
-
#write(path : String, config : Config, backup : Bool = true) : Nil
Writes a typed config object to disk.
-
#write_atomic(path : String, contents : String, backup : Bool = true) : Nil
Writes raw config contents through a temporary file and final rename.
-
#write_default(path : String) : Nil
Writes the default config, backing up an existing file when present.
Instance Method Detail
Writes a typed config object to disk.
def write_atomic(path : String, contents : String, backup : Bool = true) : Nil
#
Writes raw config contents through a temporary file and final rename.
def write_default(path : String) : Nil
#
Writes the default config, backing up an existing file when present.