craft_parts.xattrs module¶
Helpers to read and write filesystem extended attributes.
- craft_parts.xattrs.read_xattr(path, key)¶
Get extended attribute metadata from a file.
- Parameters:
path (
str) – The file to get metadata from.key (
str) – The attribute key.
- Return type:
str|None- Returns:
The attribute value.
- craft_parts.xattrs.write_xattr(path, key, value)¶
Add extended attribute metadata to a file.
- Parameters:
path (
str) – The file to add metadata to.key (
str) – The attribute key.value (
str) – The attribute value.
- Return type:
None