pub fn create_if_missing(path: &str) -> Result<()> {
        if !Path::new(path).exists() {
            fs::write(path, b"---")?;
        }
        Ok(())
    }
/// Creates a new file if it doesn't exist.
Creates a new file if it doesn't exist.
Creates a new file if it doesn ' t exist .
pub fn create_if_missing(path: &str) -> Result<()> {
        if !Path::new(path).exists() {
            fs::write(path, b"---")?;
        }
        Ok(())
    }
pub fn create_if_missing ( path : & str ) -> Result < ( ) > { if ! Path :: new ( path ) . exists ( ) { fs :: write ( path , b" " ) ? ; } Ok ( ( ) ) }
Creates a new file if it doesn't exist.
Creates a new file if it doesn ' t exist .
path
&str
path
&str