14 lines
278 B
Rust
14 lines
278 B
Rust
|
use std::env;
|
||
|
use std::fs;
|
||
|
|
||
|
fn main() {
|
||
|
let args: Vec<String> = 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);
|
||
|
}
|