Answers for "how to know if a file exists rust"

2

check if a file exists rust

use std::path::Path;

fn main() {
    println!("{}", Path::new("/etc/hosts").exists());
}
Posted by: Guest on October-18-2020

Code answers related to "how to know if a file exists rust"

Browse Popular Code Answers by Language