addDescriptor(fd:path:isDirectory:flags:fdflags:rightsBase:rightsInheriting:)¶
Opens a file descriptor.
Declaration
func addDescriptor(
fd: Int32,
path: String,
isDirectory: Bool,
flags: [String: Any],
fdflags: UInt16 = 0,
rightsBase: UInt64 = WASIState.allRights,
rightsInheriting: UInt64 = WASIState.allRights
) -> Int32
Parameters
fd: The host’s file number.
path: The path of the file.
isDirectory: Whether the file is a directory or not.
flags: Arbitrary flags.
fdflags: WASI fdflags.
rightsBase: WASi fs_rights_base.
rightsInheriting: WASI fs_rights_inheriting.
Returns
The WASI file number.