/// Write the RenderedTree to the `dest` path.
Write the RenderedTree to the `dest` path.
Write the RenderedTree to the ` dest ` path .
fn write(&self, dest: &Path) -> io::Result<()> {
        match self {
            Self::File(contents) => {
                fs::write(dest, &contents)?;
            }
            Self::Dir(tree) => {
                fs::create_dir(dest)?;
                for (filename, subtree) in tree {
                    let dest = dest.join(filename);
                    subtree.write(&dest)?;
                }
            }
        }
        Ok(())
    }
fn write ( & self , dest : & Path ) -> io :: Result < ( ) > { match self { Self :: File ( contents ) => { fs :: write ( dest , & contents ) ? ; } Self :: Dir ( tree ) => { fs :: create_dir ( dest ) ? ; for ( filename , subtree ) in tree { let dest = dest . join ( filename ) ; subtree . write ( & dest ) ? ; } } } Ok ( ( ) ) }
Write the RenderedTree to the `dest` path.
Write the RenderedTree to the ` dest ` path .
&self
dest
&Path