Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rust overwrite file

let mut write = OpenOptions::new()
        .write(true)
        .truncate(true)
        .open("filename")
        .expect("Unable to open file");
        
    write
        .write_all("data".as_bytes())
        .expect("Unable to write data");
 
PREVIOUS NEXT
Tagged: #rust #overwrite #file
ADD COMMENT
Topic
Name
1+7 =