<!--
{
  "availability" : [
    "macOS: 15.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSUnaryFileSystemOperations/unloadResource(resource:options:replyHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:objc(pl)FSUnaryFileSystemOperations(im)unloadResource:options:replyHandler:"
  },
  "title" : "unloadResource(resource:options:replyHandler:)"
}
-->

# unloadResource(resource:options:replyHandler:)

Requests that the file system unload the specified resource.

```
func unloadResource(resource: FSResource, options: FSTaskOptions, replyHandler reply: @escaping @Sendable ((any Error)?) -> Void)
```

## Parameters

`resource`

An [`FSResource`](/documentation/FSKit/FSResource) to unload.

`options`

An [`FSTaskOptions`](/documentation/FSKit/FSTaskOptions) object specifying options to apply when unloading the resource.

`reply`

A block or closure that your implementation invokes when it finishes unloading or encounters an error. If unloading fails, pass an error as the parameter to describe the problem. Otherwise, pass `nil`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)