public static writeTextAtomic(path as Path, content as String) as Void
Publishes UTF-8 text by replacing a file atomically, without a partially written destination. The temporary file resides beside the destination. On POSIX, the published file is readable and writable by its owner only. This does not serialize concurrent read/modify/write operations.
| Parameter | Description |
|---|---|
path | Destination; its parent directory must already exist. |
content | Text to publish, including embedded U+0000 characters. |
Files.writeTextAtomic(Path("settings.json"), "{}")