Skip to main content

duplicate_path

Function duplicate_path 

Source
fn duplicate_path(pack: &Pack, path: &str) -> String
Expand description

Returns a path for a copy of a file, incrementing the trailing number of its name until it’s free.

For example, “name.ext” becomes “name1.ext”, and “name1.ext” becomes “name2.ext”.