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

# activate(options:replyHandler:)

Activates the volume using the specified options.

## Declaration

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

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

## 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 doc://FSKit/documentation/FSKit/FSItem and a nil error. If activation fails, pass the relevant error as the second parameter; FSKit ignores any doc://FSKit/documentation/FSKit/FSItem in this case. In Swift, reply takes only the doc://FSKit/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 doc://FSKit/documentation/FSKit/FSItem 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.
