commit 73d53f33ebb2575c82f2ee6c48c041e27938e66d Author: WanderingPenwing Date: Fri Dec 6 14:59:59 2024 +0100 initial commit diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..caaedaf --- /dev/null +++ b/src/main.rs @@ -0,0 +1,13 @@ +use std::env; +use std::fs; + +fn main() { + let args: Vec = env::args().collect(); + + let file_path = &args[1]; + + let contents = fs::read_to_string(file_path) + .expect("Should have been able to read the file"); + + println!("content : \n{}", contents); +}