Skip to main content

create

Function create 

Source
pub fn create(
    path: impl AsRef<Path>,
    cap: &impl Has<FsWrite>,
) -> Result<WriteFile, CapSecError>
Expand description

Creates or truncates a file for writing. Returns a WriteFile that implements Write + Seek but NOT Read, enforcing the capability boundary beyond the function call. Requires FsWrite permission.