file_storage/op/file/write/
write_empty.rs

1use crate::{Error, FilePath};
2
3impl FilePath {
4    //! Write Empty
5
6    /// Writes an empty file.
7    ///
8    /// Returns `Ok(())`.
9    /// Returns `Err(FileAlreadyExists)` if the file already exists.
10    pub fn write_empty(&self) -> Result<(), Error> {
11        self.write_data(&[0u8; 0])
12    }
13}