Skip to main content

create_backup

Function create_backup 

Source
pub fn create_backup(source: &Path, backup_dir: &Path) -> Result<PathBuf>
Expand description

Create a timestamped backup of source in backup_dir.

The backup filename follows the pattern {stem}_{YYYYMMDD}_{HHMMSS}_{ffffff}.bak. Creates the backup directory if it does not exist.