Sets the option for write access. This option, when true, will indicate that the file should be `write`-able if opened. If the file already exists, any write calls on it will overwrite its contents, without truncating it. # Examples ```no_run use std::fs::OpenOptions; let file = OpenOptions::new().write(true).open("foo.txt"); ```
(&mut self, write: bool)
| 74 | /// let file = OpenOptions::new().write(true).open("foo.txt"); |
| 75 | /// ``` |
| 76 | pub fn write(&mut self, write: bool) -> &mut OpenOptions { |
| 77 | self.write = write; self |
| 78 | } |
| 79 | |
| 80 | /// Sets the option for the append mode. |
| 81 | /// |
no test coverage detected