XAttr Functions
XAttr functions provide methods for inspecting extended attributes on files.
Description
- arcapix.fs.gpfs.clib.xattr.get_all_xattrs(gpfs_file_t fileDesc)
Get all extended attributes on a file.
- arcapix.fs.gpfs.clib.xattr.get_xattr(gpfs_file_t fileDesc, name)
Get the value for an extended attribute on a file.
Examples
Lookup extended attributes
>>> from arcapix.fs.gpfs.clib.file import get_all_xattrs
>>>
>>> with open('/mmfs1/test.txt', 'r') as f:
... print(get_all_xattrs(f.fileno()))
...
{'user.foo': 'bar'}