scan_lib/
file_operations.rs

1use std::fs::{File, OpenOptions};
2
3pub fn new_file_return_append() -> File {
4    File::create("src\\blacklist.txt").unwrap();
5    OpenOptions::new().append(true).open("src\\blacklist.txt").unwrap()
6}
7
8pub fn new_file_return() -> File {
9    File::create("src\\blacklist.txt").unwrap();
10    OpenOptions::new().read(true).open("src\\blacklist.txt").unwrap()
11}