:orphan: .. _s_11PytoRuntime9WASIStateC13addDescriptor2fd4path11isDirectory5flags7fdflags10rightsBase0L10Inheritings5Int32VAM_SSSbSDySSypGs6UInt16Vs6UInt64VARtF: ``addDescriptor(fd:path:isDirectory:flags:fdflags:rightsBase:rightsInheriting:)`` ================================================================================= Opens a file descriptor. .. raw:: html .. rubric:: Declaration .. raw:: html
func addDescriptor(
       fd: Int32,
       path: String,
       isDirectory: Bool,
       flags: [String: Any],
       fdflags: UInt16 = 0,
       rightsBase: UInt64 = WASIState.allRights,
       rightsInheriting: UInt64 = WASIState.allRights
   ) -> Int32
   
.. rubric:: 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. .. rubric:: Returns The WASI file number.