Crates.io | write_atomic |
lib.rs | write_atomic |
version | |
source | src |
created_at | 2021-07-03 22:04:27.687868 |
updated_at | 2024-11-28 19:15:55.25341 |
description | Write to files atomically. |
homepage | |
repository | https://github.com/Blobfolio/write_atomic |
max_upload_size | |
id | 418345 |
Cargo.toml error: | TOML parse error at line 27, column 1 | 27 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Write Atomic was originally a stripped-down remake of tempfile-fast
, but with the 3.4.0
release of 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!
// One line is all it takes:
write_atomic::write_file("/path/to/my-file.txt", b"Some data!").unwrap();
Add write_atomic
to your dependencies
in Cargo.toml
, like:
[dependencies]
write_atomic = "0.5.*"