create_file

Function create_file 

Source
pub fn create_file<P: AsRef<Path>>(path: P) -> CoreResult<BufWriter<File>>
Expand description

Opens a file for writing

§Arguments

  • path - Path to the file

§Returns

  • Ok(BufWriter<File>) if the file was opened successfully
  • Err(CoreError::IoError) if the file could not be opened

§Errors

Returns CoreError::IoError if the file could not be opened.