use clap::Parser;


mod listing_modes;
mod util_funcs;

#[derive(Parser, Debug)]
#[clap(about="This is a part of the LGJT-CoreUtils", version="0.0.1", author="Johannes Thorén")]
struct Args {
    /// use a long listing format
    #[clap(short)]
    long: bool,
    /// do not ignore entries starting with .
    #[clap(short, long)]
    all: bool,
    /// append indicator (one of \u{1F4C1} \u{1F4C4}) to entries;
    #[clap(short = 'F', long)]
    classify: bool,

    #[clap(default_value_t=String::from("."))]
    path: String
}


fn main() {
    let args = Args::parse();
    let entries = util_funcs::get_directory_entries(args.path, args.all);
    let mut str_vec: Vec<String> = Vec::new();
    
    if args.long {
        listing_modes::long_listing_output(entries, args.classify);
    } else {
        listing_modes::short_listing_output(entries, args.classify);
    }
}
