Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

read file in rusr

use std::fs;

fn main() {
    
    let contents = fs::read_to_string(filename)
        .expect("Something went wrong reading the file");

    println!("With text:
{}", contents);
}
 
PREVIOUS NEXT
Tagged: #read #file #rusr
ADD COMMENT
Topic
Name
2+4 =