INNER CODE UNIT · Rust

print_error

Drew-Alleman/DataSurgeon · src/main.rs:653

    fn print_error(&self, message: String) -> () {
        if !self.ignore { 
            println!("[-] {}", message);
        }
    }

    // Iterates through ALL files found in the specified directory "--directory" option 
    fn iterate_files(&mut self) -> () {
        let regex_map = self.build_regex_query();
        for entry in WalkDir::new(self.directory.clone()).into_iter() {
            match entry {
                Ok(entry) if entry.file_type().is_file() => {
                    let file = File::open(Path::new(entry.path()));
                    self.line_count = 0;
                    self.filename = entry.path().display().to_string();
                    match file {
                        Ok(file) => {
                            let reader = BufReader::new(file);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…