lxattrlist


Description:

[ CCode ( array_length = false , array_null_terminated = true ) ]
[ Version ( since = "1.0.77" ) ]
public XAttr[] lxattrlist (string path, string[] names) throws Error

lgetxattr on multiple files

This call allows you to get the extended attributes of multiple files, where all files are in the directory path. names is the list of files from this directory.

On return you get a flat list of xattr structs which must be interpreted sequentially. The first xattr struct always has a zero-length attrname. attrval in this struct is zero-length to indicate there was an error doing lgetxattr for this file, *or* is a C string which is a decimal number (the number of following attributes for this file, which could be "0"). Then after the first xattr struct are the zero or more attributes for the first named file. This repeats for the second and subsequent files.

This call is intended for programs that want to efficiently list a directory contents without making many round-trips. See also lstatlist for a similarly efficient call for getting standard stats.

This function depends on the feature "linuxxattrs". See also feature_available.

Parameters:

this

A GuestfsSession object

names

an array of strings

Returns:

an array of XAttr objects, or NULL on error