Skip to main content

file_mtime_nanos

Function file_mtime_nanos 

Source
pub fn file_mtime_nanos(path: &Path) -> u64
Expand description

Get the mtime of a file in nanoseconds since UNIX epoch cast to u64, or 0 on failure.

u64 is used rather than u128 so the value fits in SQLite’s INTEGER (64-bit signed). Nanosecond precision avoids false cache hits when a file is modified within the same second.