winwalk

Crates.iowinwalk
lib.rswinwalk
version0.2.2
sourcesrc
created_at2023-09-20 11:06:08.03427
updated_at2023-12-20 05:58:44.869566
descriptionWalk directories on Windows.
homepage
repositoryhttps://github.com/zX3no/winwalk
max_upload_size
id978034
size27,233
Bay (zX3no)

documentation

https://docs.rs/winwalk

README

use winwalk::*;

fn main() {
   for drive in drives().into_iter().flatten() {
        println!("Found Drive: {drive}");
    }

    println!();

    for file in walkdir("D:\\Desktop", 1).into_iter().flatten() {
        let pad = if file.is_folder { "  " } else { "--" };
        println!("{pad}{}", file.name);
        println!("  {:?}", file.path);

        println!(
            "  Last Write Time: {:02}/{:02}/{} {:02}:{:02}:{:02}",
            file.last_write.day,
            file.last_write.month,
            file.last_write.year,
            file.last_write.hour,
            file.last_write.minute,
            file.last_write.second,
        );
        println!("  Size: {:?}", file.size);
        println!("  Directory: {:?}", file.is_folder);
        println!();
    }
}
Commit count: 30

cargo fmt