Skip to main content

Module util

Module util 

Source
Expand description

Small helpers shared by the crates that keep files on disk.

Functionsยง

now_ms
Milliseconds since the Unix epoch, or 0 if the clock is before it.
write_atomic
Replaces path so that a crash leaves the old contents or the new ones, never part of them: the bytes are synced to a temporary file, the file is renamed, and the directory is synced so that the rename survives too.