reclaimItem(_:replyHandler:)
Reclaims an item, releasing any resources allocated for the item.
Declaration
func reclaimItem(_ item: FSItem, replyHandler reply: @escaping @Sendable ((any Error)?) -> Void)func reclaimItem(_ item: FSItem) async throwsParameters
- item:
The item to reclaim.
- reply:
A block or closure to indicate success or failure. If removal fails, pass an error as the one parameter to the reply handler. If removal succeeds, pass
nil. For anasyncSwift implementation, there’s no reply handler; simply throw an error or return normally.
Discussion
FSKit guarantees that for every FSItem returned by the volume, a corresponding reclaim operation occurs after the upper layers no longer reference that item.