Answers for "rust if file exists fs"

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