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 inLookupFlags dirflags
Flags specifying how the path will be resolvedchar *path
The path of the file or directory to openu32 path_len
The length of thepath
stringOflags o_flags
How the file will be openedRights fs_rights_base
The rights of the created file descriptorRights fs_rightsinheriting
The rights of file descriptors derived from the created file descriptorFdflags 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
, andErrno::Notcapable