open

Function open 

Source
pub fn open<P: AsRef<Path> + ?Sized>(
    path: &P,
    format: &Format,
) -> Result<Context, Error>
Expand description

Opens a file with a specific format (input or output).

Prefer input() or output() unless you need format override.

§Parameters

  • path - File path to open
  • format - Format to use (Input for reading, Output for writing)

§Errors

Returns an error if the file cannot be opened or the format is unsupported.

§Note

For input contexts, this automatically probes stream information after opening.