Contents

closeItem(_:modes:replyHandler:)

Closes a file from further access.

Declaration

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

Parameters

  • item:

    The item to close.

  • modes:

    The set of mode flags to keep after this close.

  • reply:

    A block or closure to indicate success or failure. If closing fails, pass an error as the one parameter to the reply handler. If closing 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