/filefind/rust/filefind.rs |
---|
0,0 → 1,15 |
use std::env; |
fn main() { |
let args: Vec<String> = env::args().collect(); |
//println!("{:?}", args); |
let progname = &args[0]; |
if args.len() == 2 { |
let directory = &args[1]; |
println!("{}", directory); |
} |
else { |
println!("ERROR: 1 argument expected for {}", progname ); |
} |
} |