Skip to main content

open

Function open 

Source
pub fn open(
    path: impl AsRef<Path>,
    cap: &impl Has<FsRead>,
) -> Result<ReadFile, CapSecError>
Expand description

Opens a file for reading. Returns a ReadFile that implements Read + Seek but NOT Write, enforcing the capability boundary beyond the function call. Requires FsRead permission.