---
title: "activate(options:replyHandler:)"
framework: fskit
role: symbol
role_heading: Instance Method
path: "fskit/fsvolume/handler/activate(options:replyhandler:)"
---

# activate(options:replyHandler:)

Activates the volume using the specified options.

## Declaration

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

```swift
func activate(options: FSTaskOptions) async throws -> FSActivateResult
```

## 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 an instance of doc://FSKit/documentation/FSKit/FSActivateResult containing the root doc://FSKit/documentation/FSKit/FSItem, along with a nil error. If activation fails, pass the relevant error as the second parameter; FSKit ignores the doc://FSKit/documentation/FSKit/FSActivateResult instance in this case. For an async Swift implementation, there’s no reply handler; simply return the result instance or throw an error.

## Discussion

Discussion When FSKit calls this method, allocate any in-memory state required to represent the file system. Also allocate an 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.

## See Also

### Handling activation and deactivation

- [FSItem](fskit/fsitem.md)
- [FSActivateResult](fskit/fsactivateresult.md)
- [deactivate(options:replyHandler:)](fskit/fsvolume/handler/deactivate(options:replyhandler:).md)
- [FSDeactivateOptions](fskit/fsdeactivateoptions.md)
