|LISTXATTR(2)||System Calls Manual||LISTXATTR(2)|
flistxattr — list extended
char *path, char
fd, char *namebuf,
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc).
retrieves a list of names of extended attributes associated with the given
path in the file system.
namebuf is a data buffer of size bytes for the names of the extended attributes associated with path. The extended attribute names are simple NULL-terminated UTF-8 strings and are returned in arbitrary order. No extra padding is provided between names in the buffer. The list will only include names of extended attributes to which the calling process has access. The function returns the size of the list of names.
options controls how the attribute list is generated:
listxattr() normally lists attributes of the target of path if it is a symbolic link. With this option,
listxattr() will list attributes of the link itself.
flistxattr() will list HFS Plus Compression extended attribute(s) (if present) for the file referred to by path or fd.
If namebuf is set to NULL, the function returns the size of the list of extended attribute names. This facility can be used to determine the size of a buffer sufficiently large to hold the names of the attributes currently associated with path.
is identical to
listxattr(), except that it returns
the list of extended attribute names associated with the open file
referenced by file descriptor fd.
On success, the size of the extended attribute name list is returned. If no accessible extended attributes are associated with the given path or fd, the function returns zero. On failure, -1 is returned and the global variable errno is set as follows.
XATTR_MAXNAMELENUTF-8 bytes, or a component of path exceeds
NAME_MAXcharacters, or the entire path exceeds
flistxattr() first appeared in Mac OS X 10.4.
|October 19, 2004||Mac OS X|