listExtendedAttributes(_:)
List the names of extended attributes.
This declaration is gated by at least one @_spi attribute.
func listExtendedAttributes(_ buffer: UnsafeMutableBufferPointer<CChar>?) -> Result<Int, Errno>
Parameters
- buffer
The buffer into which names are written. Names are written are NULL terminated UTF-8 strings and are returned in an arbitrary order. There is no padding between strings. If
buffer
isnil
then the return value is the size of the buffer required to list all extended attributes. If there is not enough space in thebuffer
thenErrno.outOfRange
is returned.
Returns
The size of the extended attribute list.
The corresponding C function is flistxattr
.