wc
examples/other/rust-wc/Cargo.toml
[package] name = "rust-wc" version = "0.1.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies]
examples/other/rust-wc/src/main.rs
use std::env; fn main() { // get the path from the command line // if it is a file work on it // if it is a folder ... // get command line parameters let files: Vec<String> = env::args().collect(); for file in &files[1..files.len()] { dbg!(file); } }