Skip to main content

name_files

Function name_files 

Source
pub fn name_files(
    files: &[String],
    existing: &HashSet<String>,
    how: Collision,
) -> Vec<String>
Expand description

Chooses the names for files copied into one directory that already holds existing (lower-cased). Names are compared ignoring case. A name used once, and free, is kept. Otherwise every file of that name is numbered, as Eagle does: a.png twice becomes a-1.png and a-2.png; with KeepBoth, an a.png already there counts as the first, so a new one becomes a-2.png. A numbered name that is taken is skipped.