Skip to main content

mirror_into_backup

Function mirror_into_backup 

Source
pub fn mirror_into_backup(
    backup_root: &Utf8Path,
    abs_target: &Utf8Path,
) -> Utf8PathBuf
Expand description

Mirror an absolute target path into a backup directory, dropping the drive colon on Windows so the path is filesystem-safe.

  C:\Users\u\foo.yml + .yui/backup → .yui/backup/C/Users/u/foo.yml
  /home/u/foo.yml    + .yui/backup → .yui/backup/home/u/foo.yml