class Obsctl::Config::ConfigWriter

Overview

Writes config files with backup and atomic-replace semantics.

Defined in:

obsctl/config/config_writer.cr

Instance Method Summary

Instance Method Detail

def write(path : String, config : Config, backup : Bool = true) : Nil #

Writes a typed config object to disk.


[View source]
def write_atomic(path : String, contents : String, backup : Bool = true) : Nil #

Writes raw config contents through a temporary file and final rename.


[View source]
def write_default(path : String) : Nil #

Writes the default config, backing up an existing file when present.


[View source]