//! Built-in `file://` driver and bare-path fallback.
usestd::fs::File;useoxideav_core::{Error, ReadSeek,Result};usecrate::uri;/// Open a local file as a `Box<dyn ReadSeek>`. Accepts:
/// - bare paths: `/abs/path`, `rel/path`, `Cargo.toml`
/// - `file:///abs/path`
/// - `file:relative`
pubfnopen_file(uri_str:&str)->Result<Box<dyn ReadSeek>>{let(scheme, rest)=uri::split(uri_str);if scheme !="file"{returnErr(Error::invalid(format!("file driver invoked on non-file URI: {uri_str}")));}let f =File::open(rest)?;Ok(Box::new(f))}