Contents

openItem(_:modes:replyHandler:)

Opens a file for access.

Declaration

func openItem(_ item: FSItem, modes: FSVolume.OpenModes, replyHandler reply: @escaping  @Sendable ((any Error)?) -> Void)
func openItem(_ item: FSItem, modes: FSVolume.OpenModes) async throws

Parameters

  • item:

    The item to open.

  • modes:

    The set of mode flags to open the item with.

  • reply:

    A block or closure to indicate success or failure. If opening fails, pass an error as the one parameter to the reply handler. If opening succeeds, pass nil. For an async Swift implementation, there’s no reply handler; simply throw an error or return normally.

See Also

Opening and closing