Skip to main content

thumb_tmp_path

Function thumb_tmp_path 

Source
pub fn thumb_tmp_path(hash: &str, size: u32) -> PathBuf
Expand description

Path to a scratch file for writing a thumbnail before it’s atomically renamed into place at thumb_path. Lives in the same directory as the final file so the rename is same-filesystem (and thus atomic on POSIX). Includes the current process ID so concurrent writers (e.g. two videre watch instances, or a leftover file from a crashed process) don’t collide on the same temp name.