Function wasmer_wasix::syscalls::wasi::path_open::path_open

source ·
pub fn path_open<M: MemorySize>(
    ctx: FunctionEnvMut<'_, WasiEnv>,
    dirfd: Fd,
    dirflags: LookupFlags,
    path: WasmPtr<u8, M>,
    path_len: M::Offset,
    o_flags: Oflags,
    fs_rights_base: Rights,
    fs_rights_inheriting: Rights,
    fs_flags: Fdflags,
    fd: WasmPtr<Fd, M>,
) -> Result<Errno, WasiError>
Expand description

§path_open()

Open file located at the given path Inputs:

  • Fd dirfd The fd corresponding to the directory that the file is in
  • LookupFlags dirflags Flags specifying how the path will be resolved
  • char *path The path of the file or directory to open
  • u32 path_len The length of the path string
  • Oflags o_flags How the file will be opened
  • Rights fs_rights_base The rights of the created file descriptor
  • Rights fs_rightsinheriting The rights of file descriptors derived from the created file descriptor
  • Fdflags fs_flags The flags of the file descriptor Output:
  • Fd* fd The new file descriptor Possible Errors:
  • Errno::Access, Errno::Badf, Errno::Fault, Errno::Fbig?, Errno::Inval, Errno::Io, Errno::Loop, Errno::Mfile, Errno::Nametoolong?, Errno::Nfile, Errno::Noent, Errno::Notdir, Errno::Rofs, and Errno::Notcapable