[][src]Crate tempfile_fast

Sponge

A Sponge is a safe and efficient way to update a file in place.

Example

let mut temp = tempfile_fast::Sponge::new_for("example.txt").unwrap();
temp.write_all(b"hello").unwrap();
temp.commit().unwrap();

PersistableTempFile

The raw PersistableTempFile is also available. However, You probably want to use the tempfile crate unless you have hit a known performance problem, or you only care about modern Linux. See README.md for more details.

Example (raw)

let mut temp = tempfile_fast::PersistableTempFile::new_in("/var/lib/foo").unwrap();
temp.write_all(b"hello").unwrap();
temp.persist_noclobber("/var/lib/foo/bar").unwrap();

Structs

PersistError

Error returned when persisting a temporary file fails

Sponge

A safer abstraction for atomic overwrites of files.

Enums

PersistableTempFile

An abstraction over different platform-specific temporary file optimisations.