ll-rs 0.0.0

A small ls -l rerwrite in rust with colors!
Documentation
pub mod colors;
pub mod entry;

use crate::entry::Entry;
use std::{env, error::Error, fs};

pub fn output() -> Result<(), Box<dyn Error>> {
    let entries = get_entries()?;

    for entry in entries {
        println!("{}", entry.print)
    }

    Ok(())
}

fn get_entries() -> Result<Vec<Entry>, Box<dyn Error>> {
    let mut entries = Vec::new();

    for path in fs::read_dir(env::current_dir()?)? {
        entries.push(Entry::from_path(&path?.path())?);
    }

    Ok(entries)
}