You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
use std::fs::File;
|
|
use std::fs::OpenOptions;
|
|
fn main() {
|
|
// Method 1
|
|
let _file1 = File::open("stats1.txt").expect("File not found");
|
|
// Method 2
|
|
let _file2 = OpenOptions::new()
|
|
.write(true)
|
|
.create(true)
|
|
.open("stats2.txt");
|
|
}
|