Function open_rw

Source
pub fn open_rw<P: AsRef<Path> + Debug>(path: P) -> Result<File>
Expand description

Open a file for reading and writing, without truncating it if it exists, but creating it if it doesn’t exist. The filehandle is in append mode (XX is it?, only on Unix?). You can use this to open a file that you intend to mutate, but need to flock first (i.e. can’t truncate before you’ve got the lock).