open_file

Function open_file 

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

Opens a file and returns a file handle.

§Arguments

  • path - The file system path to open

§Returns

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

§Examples

let path = std::path::Path::new("source.rs");
let file = open_file(path)?;