---
title: "listXattrs(of:replyHandler:)"
framework: fskit
role: symbol
role_heading: Instance Method
path: "fskit/fsvolume/xattroperations/listxattrs(of:replyhandler:)"
---

# listXattrs(of:replyHandler:)

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

## Declaration

```swift
func listXattrs(of item: FSItem, replyHandler reply: @escaping @Sendable ([FSFileName]?, (any Error)?) -> Void)
```

```swift
func xattrs(of item: FSItem) async throws -> [FSFileName]
```

## Parameters

- `item`: The item from which to get extended attributes.
- `reply`: A block or closure to indicate success or failure. If getting the list of extended attributes succeeds, pass the xattrs as an array of doc://FSKit/documentation/FSKit/FSFileName instances and a nil error. If getting the attributes fails, pass nil along with the relevant error. For an async Swift implementation, there’s no reply handler; simply return the byte count or throw an error.
