create_file

Function create_file 

Source
pub fn create_file(path: &Path) -> Result<File, OakError>
Expand description

Creates a file and returns a file handle.

§Arguments

  • path - The file system path to create

§Returns

A Result containing the file handle if successful, or an OakError if creation fails

§Examples

let path = std::path::Path::new("output.txt");
let file = create_file(path)?;