<!--
{
  "availability" : [
    "macOS: 15.4.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSVolume/AccessCheckOperations/checkAccess(to:requestedAccess:replyHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:objc(pl)FSVolumeAccessCheckOperations(im)checkAccessToItem:requestedAccess:replyHandler:"
  },
  "title" : "checkAccess(to:requestedAccess:replyHandler:)"
}
-->

# checkAccess(to:requestedAccess:replyHandler:)

Checks whether the file system allows access to the given item.

```
func checkAccess(to theItem: FSItem, requestedAccess access: FSVolume.AccessMask, replyHandler reply: @escaping @Sendable (Bool, (any Error)?) -> Void)
```

## Parameters

`theItem`

The item for which to check access.

`access`

A mask indicating a set of access types for which to check.

`reply`

A block or closure to indicate success or failure. If the access check succeeds, pass a Boolean value to indicate whether the file system grants access, followed by a `nil` error. If the access check fails, pass the relevant error as the second parameter; FSKit ignores the Boolean parameter in this case. For an `async` Swift implementation, there’s no reply handler; simply return the `Bool` or throw an error.

---

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)