file-kitty 0.2.0

A versatile file manipulation toolkit with async support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use anyhow::Result;
use file_kitty::encoding::scan_directory;
use std::path::Path;

#[tokio::main]
async fn main() -> Result<()> {
    // Get the path of the example file directory
    let example_dir = Path::new(env!("CARGO_MANIFEST_DIR"))
        .join("examples")
        .join("encoding");
    
    println!("Start to scan directory: {}", example_dir.display());
    scan_directory(example_dir.to_str().unwrap(), false, false).await?;
    
    Ok(())
}