| |
- getxattr(...)
- Get the value of a given extended attribute.
Parameters:
- a string representing filename, or a file-like object,
or a file descriptor; this represents the file on
which to act
- a string, representing the attribute whose value to retrieve;
usually in form of system.posix_acl or user.mime_type
- (optional) a boolean value (defaults to false), which, if
the file name given is a symbolic link, makes the
function operate on the symbolic link itself instead
of its target;
- listxattr(...)
- Return the tuple of attribute names from a file
Parameters:
- a string representing filename, or a file-like object,
or a file descriptor; this represents the file to
be queried
- (optional) a boolean value (defaults to false), which, if
the file name given is a symbolic link, makes the
function operate on the symbolic link itself instead
of its target;
- removexattr(...)
- Remove an attribute from a file
Parameters:
- a string representing filename, or a file-like object,
or a file descriptor; this represents the file on
which to act
- a string, representing the attribute to be removed;
usually in form of system.posix_acl or user.mime_type
- (optional) a boolean value (defaults to false), which, if
the file name given is a symbolic link, makes the
function operate on the symbolic link itself instead
of its target;
- setxattr(...)
- Set the value of a given extended attribute.
Be carefull in case you want to set attributes on symbolic
links, you have to use all the 5 parameters; use 0 for the
flags value if you want the default behavior (create or replace)
Parameters:
- a string representing filename, or a file-like object,
or a file descriptor; this represents the file on
which to act
- a string, representing the attribute whose value to set;
usually in form of system.posix_acl or user.mime_type
- a string, possibly with embedded NULLs; note that there
are restrictions regarding the size of the value, for
example, for ext2/ext3, maximum size is the block size
- (optional) flags; if 0 or ommited the attribute will be
created or replaced; if XATTR_CREATE, the attribute
will be created, giving an error if it already exists;
of XATTR_REPLACE, the attribute will be replaced,
giving an error if it doesn't exists;
- (optional) a boolean value (defaults to false), which, if
the file name given is a symbolic link, makes the
function operate on the symbolic link itself instead
of its target;
|