From a8d1be9536bce6d6be2cf1586c8bac049e820d31 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Sun, 8 Sep 2024 17:21:27 +0200 Subject: save files, real last modified check (doesn't work correctly) --- src/main.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index d5ccb75..acb728f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,18 +16,23 @@ fn main() -> color_eyre::Result<()> { cfg.directories.push("~/.config/nvim".to_string()); cfg.directories.push("~/.config/hypr".to_string()); cfg.root = "./backup".to_string(); + // cfg.root = "./backup-test".to_string(); + // cfg.directories.push("u:/code/proj/fxbaup/backup-test-dir".to_string()); let pacman = Pacman; - let pkgs = pacman.get_installed(); + let pkgs = pacman.get_installed()?; let backup = Backup::create(&cfg, pkgs)?; - println!("{backup:#?}"); + // println!("{backup:#?}"); - // backup.save(&cfg)?; + backup.save(&cfg)?; - let index = Backup::get_index(&cfg, None)?; + // PathInfo::compare_to_last_modified(&cfg, &LocationRoot::User("fx".to_string()), "code/proj/fxbaub/backup-test-dir/size.txt")?; + // PathInfo::compare_to_last_modified(&cfg, &LocationRoot::User("fx".to_string()), "code/proj/fxbaub/backup-test-dir/content.txt")?; - println!("{index:#?}"); + // let index = Backup::get_index(&cfg, None)?; + + // println!("{index:#?}"); // let fi = FileInfo::new("~/.config/nvim", &cfg)?; // println!("{:?}", fi.get_absolute_path()); -- cgit v1.2.3