diff options
Diffstat (limited to 'src/reader.rs')
| -rw-r--r-- | src/reader.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/reader.rs b/src/reader.rs index b7396cd..5b1b75f 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -2,11 +2,18 @@ //aim is to read this as a stream use std::fs::File; use std::io::BufReader; -use std::io::prelude::*; +use std::path::Path; + pub fn file_reader(file_path:&str) ->Result<BufReader<File>, Box<dyn std::error::Error>>{ - let file = File::open(file_path)?; + + let y = Path::new(file_path); + + //println!("the file path is {}",y.display(); + println!("{}",y.display()); + + let file = File::open(Path::new(file_path))?; let buf_reader = BufReader::new(file); |
