Skip to main content

write

Function write 

Source
pub fn write(path: &Path, id: &MachineId) -> Result<(), MachineIdFileError>
Expand description

Write id to path through a temporary file in the same directory and a rename, so a reader sees either the old file or the complete new one.

This replaces an existing file. The daemon only calls it when the file is absent; ck machine adopt calls it deliberately.