getXattr(named:of:context:replyHandler:)
Gets the specified extended attribute of the given item.
Declaration
func getXattr(named name: FSFileName, of item: FSItem, context: FSContext, replyHandler reply: @escaping @Sendable (FSGetXattrResult?, (any Error)?) -> Void)func xattr(named name: FSFileName, of item: FSItem, context: FSContext) async throws -> FSGetXattrResultParameters
- name:
The extended attribute name.
- item:
The item for which to get the extended attribute.
- context:
An object that enables context-aware file system decisions throughout the operation.
- reply:
A block or closure to indicate success or failure. If getting the attribute succeeds, pass an instance of Fsgetxattrresult containing the extended attribute data, along with a
nilerror. If getting the attribute fails, pass the relevant error as the second parameter; FSKit ignores the Fsgetxattrresult instance in this case. For anasyncSwift implementation, there’s no reply handler; simply return the result instance or throw an error.