AtomicFileWriter
object AtomicFileWriter
Writes files atomically: content is first written to a temporary sibling file which is then moved into place with StandardCopyOption.ATOMIC_MOVE, so readers never observe partially written output. Write failures propagate to the caller; the temporary file is always cleaned up.