Crate tempfile_fast[][src]

Expand description

tempfile-fast

(Slightly) faster temporary files on Linux.

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

Error returned when persisting a temporary file fails.

A safer abstraction for atomic overwrites of files.

Enums

An abstraction over different platform-specific temporary file optimisations.