Answers for "check 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

Browse Popular Code Answers by Language