<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSVolume/XattrHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:objc(pl)FSVolumeXattrHandler"
  },
  "title" : "FSVolume.XattrHandler"
}
-->

# FSVolume.XattrHandler

Methods and properties implemented by volumes that natively or partially support extended attributes.

```
protocol XattrHandler : NSObjectProtocol
```

## Overview> Important: This protocol replaces the ``doc://FSKit/documentation/FSKit/FSVolume/XattrOperations`` protocol. It exposes the same functionality, while using ``doc://FSKit/documentation/FSKit/FSVolumeHandlerResult`` objects. These objects add the ability to reply with ``doc://FSKit/documentation/FSKit/FSItem/Attributes`` and free space from the relevant methods.

## Topics

### Reading and writing

[`func getXattr(named: FSFileName, of: FSItem, context: FSContext, replyHandler: (FSGetXattrResult?, (any Error)?) -> Void)`](/documentation/FSKit/FSVolume/XattrHandler/getXattr(named:of:context:replyHandler:))

Gets the specified extended attribute of the given item.

[`class FSGetXattrResult`](/documentation/FSKit/FSGetXattrResult)

The result of a get-extended-attributes call.

[`func listXattrs(of: FSItem, context: FSContext, replyHandler: (FSListXattrsResult?, (any Error)?) -> Void)`](/documentation/FSKit/FSVolume/XattrHandler/listXattrs(of:context:replyHandler:))

Gets the list of extended attributes currently set on the given item.

[`class FSListXattrsResult`](/documentation/FSKit/FSListXattrsResult)

The result of a list-extended-attributes call.

[`func setXattr(named: FSFileName, to: Data?, on: FSItem, policy: FSVolume.SetXattrPolicy, context: FSContext, replyHandler: (FSSetXattrResult?, (any Error)?) -> Void)`](/documentation/FSKit/FSVolume/XattrHandler/setXattr(named:to:on:policy:context:replyHandler:))

Sets the specified extended attribute data on the given item.

[`enum SetXattrPolicy`](/documentation/FSKit/FSVolume/SetXattrPolicy)

Flags to specify the policy when setting extended file attributes.

[`class FSSetXattrResult`](/documentation/FSKit/FSSetXattrResult)

The result of a set-extended-attributes call.

[`func supportedXattrNames(for: FSItem) -> [FSFileName]`](/documentation/FSKit/FSVolume/XattrHandler/supportedXattrNames(for:))

Returns an array that specifies the extended attribute names the given item supports.

### Inspecting volume properties

[`var xattrOperationsInhibited: Bool`](/documentation/FSKit/FSVolume/XattrHandler/xattrOperationsInhibited)

A Boolean value that instructs FSKit not to call this protocol’s methods, even if the volume conforms to it.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)