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

# activate(options:replyHandler:)

Activates the volume using the specified options.

```
func activate(options: FSTaskOptions, replyHandler reply: @escaping @Sendable (FSItem?, (any Error)?) -> Void)
```

## Parameters

`options`

Options to apply to the activation. These can include security-scoped file paths. There are no defined options currently.

`reply`

A block or closure to indicate success or failure. If activation succeeds, pass the root [`FSItem`](/documentation/FSKit/FSItem) and a `nil` error. If activation fails, pass the relevant error as the second parameter; FSKit ignores any [`FSItem`](/documentation/FSKit/FSItem) in this case. In Swift, `reply` takes only the [`FSItem`](/documentation/FSKit/FSItem) as the parameter; you signal any error with a `throw`. For an `async` Swift implementation, there’s no reply handler; simply return the [`FSItem`](/documentation/FSKit/FSItem) or throw an error.

## Discussion

When FSKit calls this method, allocate any in-memory state required to represent the file system.
Also allocate an [`FSItem`](/documentation/FSKit/FSItem) for the root directory of the file system, and pass it to the reply block.
FSKit caches this root item for the lifetime of the volume, and uses it as a starting point for all file look-ups.

Volume activation occurs prior to any call to mount the volume.

---

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)