/// Write the contents to a file, and add that file as a blob at the given
/// path within the package.
Write the contents to a file, and add that file as a blob at the given
path within the package.
Write the contents to a file and add that file as a blob at the given path within the package .
pub fn add_contents_as_blob<C: AsRef<[u8]>>(
        &mut self,
        at_path: impl AsRef<str>,
        contents: C,
        gendir: impl AsRef<Path>,
    ) -> Result<()> {
        // Preflight that the file paths are valid before attempting to write.
        self.validate_ok_to_add_at_path(&at_path)?;
        let source_path = Self::write_contents_to_file(gendir, at_path.as_ref(), contents)?;
        self.add_file_as_blob(at_path, source_path.path_to_string()?)
    }
pub fn add_contents_as_blob < C : AsRef < [ u8 ] > > ( & mut self , at_path : impl AsRef < str > , contents : C , gendir : impl AsRef < Path > , ) -> Result < ( ) > { // Preflight that the file paths are valid before attempting to write. self . validate_ok_to_add_at_path ( & at_path ) ? ; let source_path = Self :: write_contents_to_file ( gendir , at_path . as_ref ( ) , contents ) ? ; self . add_file_as_blob ( at_path , source_path . path_to_string ( ) ? ) }
Write the contents to a file, and add that file as a blob at the given
path within the package.
Write the contents to a file and add that file as a blob at the given path within the package .
&mut self
at_path
impl AsRef<str>
contents
C
gendir
impl AsRef<Path>