file-organizer 0.7.1

A powerful, cross-platform file organization tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use colored::*;

mod operation;
pub use operation::select_operation_mode;

pub fn print_header() {
    println!("{}", "\n🚀 File Organizer v1.0".bright_blue().bold());
    println!("{}", "===================".bright_blue());
}

pub fn handle_error(error: impl std::fmt::Display, output_path: Option<&std::path::PathBuf>) {
    if let Some(path) = output_path {
        crate::ui::cleanup(path);
    }
    eprintln!("{} {}", "❌ Error:".red(), error.to_string().bright_red());
    std::process::exit(1);
}