Append To File Rust

[Solved] Append To File Rust | Rust - Code Explorer | yomemimo.com
Question : append to file rust

Answered by : ali-ahmed

// 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");

Source : | Last Update : Sun, 25 Oct 20

Answers related to append to file rust

Code Explorer Popular Question For Rust