pub fn create_file(path: &Path, content: &str) -> Result<()> {
    let mut file = File::create(&path)
        .map_err(|e| Error::chain(format!("Failed to create file {}", path.display()), e))?;
    file.write_all(content.as_bytes())?;
    Ok(())
}
/// Create a file with the content given
Create a file with the content given
Create a file with the content given
pub fn create_file(path: &Path, content: &str) -> Result<()> {
    let mut file = File::create(&path)
        .map_err(|e| Error::chain(format!("Failed to create file {}", path.display()), e))?;
    file.write_all(content.as_bytes())?;
    Ok(())
}
pub fn create_file ( path : & Path , content : & str ) -> Result < ( ) > { let mut file = File :: create ( & path ) . map_err ( | e | Error :: chain ( format ! ( " " path display ( ) ) , e ) ) ? ; file . write_all ( content . as_bytes ( ) ) ? ; Ok ( ( ) ) }
Create a file with the content given
Create a file with the content given
path
&Path
content
&str
path
&Path
content
&str