# Write Atomic
[](https://docs.rs/write_atomic/)
[](https://github.com/Blobfolio/write_atomic/blob/master/CHANGELOG.md)<br>
[](https://crates.io/crates/write_atomic)
[](https://github.com/Blobfolio/write_atomic/actions)
[](https://deps.rs/repo/github/blobfolio/write_atomic)<br>
[](https://en.wikipedia.org/wiki/WTFPL)
[](https://github.com/Blobfolio/write_atomic/issues)
Write Atomic was originally a stripped-down remake of [`tempfile-fast`](https://crates.io/crates/tempfile-fast), but with the `3.4.0` release of [`tempfile`](https://crates.io/crates/tempfile), it has largely been mooted.
(`tempfile` now supports Linux optimizations like `O_TMPFILE` natively.)
That said, one might still enjoy the ergonomic single-shot nature of Write Atomic's `write_file` and `copy_file` methods, as well as their permission/ownership-syncing behaviors, and so it lives on!
## Examples
```rust
// One line is all it takes:
write_atomic::write_file("/path/to/my-file.txt", b"Some data!").unwrap();
```
## Installation
Add `write_atomic` to your `dependencies` in `Cargo.toml`, like:
```
[dependencies]
write_atomic = "0.5.*"
```