Skip to main content

write_unused

Function write_unused 

Source
fn write_unused(dir: &Path, filename: &str, bytes: &[u8]) -> Result<PathBuf>
Expand description

Write bytes to filename in dir, or to name (2).ext, name (3).ext … when that name is taken. The file is created only if nothing is there (create_new, which does not follow a link to somewhere else), so a file that appears between two tries is never overwritten.