pub fn write(path: &UnixStr, buf: &[u8]) -> Result<()>Expand description
Attempts to write the entire contents of buf into the path specified at path.
If no file exists at path one will be created.
If a file exists at path it will be overwritten.
Use File and open with append to append to a file.
Errors
Os errors relating to file creation or writing, such as permissions errors.