From 73d53f33ebb2575c82f2ee6c48c041e27938e66d Mon Sep 17 00:00:00 2001 From: WanderingPenwing Date: Fri, 6 Dec 2024 14:59:59 +0100 Subject: [PATCH] initial commit --- src/main.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/main.rs 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); +}