ALPHA: Note this crate is a work-in-progress and is not yet ready for production use.
tempfile-fast, bytes will first be written to a temporary file — either
O_TMPFILE on supporting Linux systems or via the
tempfile crate — then moved the final destination.
When overwriting an existing file, permissions and ownership will be preserved, otherwise the permissions and ownership will default to the same values you’d get if using
Because there is just a single
write_file method, this crate is only really suitable in cases where you have the path and all the bytes you want to write ready to go. If you need more granular
Write support, use
// One line is all it takes: write_atomic::write_file("/path/to/my-file.txt", b"Some data!").unwrap();
write_atomic to your
[dependencies] write_atomic = "0.2.*"
Atomic File Write!