/// Write the given contents to the file to its destination with the chosen permissions.
Write the given contents to the file to its destination with the chosen permissions.
Write the given contents to the file to its destination with the chosen permissions .
pub fn replace_contents(mut self, contents: impl AsRef<[u8]>) -> Result<()> {
        self.write_all(contents.as_ref())?;
        let permissions = self.default_permissions()?;
        self.replace_with_perms(permissions)
    }
pub fn replace_contents ( mut self , contents : impl AsRef < [ u8 ] > ) -> Result < ( ) > { self . write_all ( contents . as_ref ( ) ) ? ; let permissions = self . default_permissions ( ) ? ; self . replace_with_perms ( permissions ) }
Write the given contents to the file to its destination with the chosen permissions.
Write the given contents to the file to its destination with the chosen permissions .
mut self
contents
impl AsRef<[u8]>