rembackup/src/indexchanges.rs
Mark 6172ffe248 show sizes in list of changes; sort; progress bar
in the list of changes, "add file" and "add dir"
type changes now show the size of the file to be
copied or the sum of the directory content sizes.

changes are now sorted from largest to smallest

progress bar now shows the smaller and larger
progress of change-count or transferred size,
where the larger progress is before the '>'
and the smaller one is on the last '=' before
the '-'s start (which indicate larger-not-smaller)

[========---------->               ]
2024-12-24 01:37:18 +01:00

16 lines
398 B
Rust
Executable File

use std::path::PathBuf;
use crate::indexfile::IndexFile;
#[derive(Debug)]
pub enum IndexChange {
/// Ensure a directory with this path exists (at least if all its parent directories exist).
AddDir(PathBuf, u64),
/// Add or update a file
AddFile(PathBuf, IndexFile),
/// Remove a file
RemoveFile(PathBuf),
/// Remove a directory (recursively)
RemoveDir(PathBuf),
}