Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

append to file rust

// don't forget importing this
use std::io::Write;

let mut file = fs::OpenOptions::new()
      .write(true)
      .append(true)
      .open("file.txt")
      .unwrap();
      
file.write_all(b"to append");
// or
write!(file, "to append");
 
PREVIOUS NEXT
Tagged: #append #file #rust
ADD COMMENT
Topic
Name
2+3 =