Function write_atomic

Source
pub fn write_atomic(path: &Path, content: &str) -> Result<(), String>
Expand description

Replaces a playlist only after its complete text has been written.

Shares the exclusive temporary-output policy used by copying. A symbolic link or non-regular final path is refused; failed publication leaves the previous playlist intact and removes unfinished temporary output.