Sets the option for creating a new file. This option indicates whether a new file will be created if the file does not yet already exist. In order for the file to be created, [`write`] or [`append`] access must be used. [`write`]: #method.write [`append`]: #method.append # Examples ```no_run use std::fs::OpenOptions; let file = OpenOptions::new().write(true).create(true).open("foo.txt"); ```
(&mut self, create: bool)
| 159 | /// let file = OpenOptions::new().write(true).create(true).open("foo.txt"); |
| 160 | /// ``` |
| 161 | pub fn create(&mut self, create: bool) -> &mut OpenOptions { |
| 162 | self.create = create; self |
| 163 | } |
| 164 | |
| 165 | /// Opens a file at `path` with the options specified by `self`. |
| 166 | /// |
nothing calls this directly
no test coverage detected