lgetxattr


Description:

[ CCode ( array_length_pos = 2.1 , array_length_type = "gsize" ) ]
[ Version ( since = "1.7.24" ) ]
public uint8[] lgetxattr (string path, string name) throws Error

get a single extended attribute

Get a single extended attribute from file path named name. If path is a symlink, then this call returns an extended attribute from the symlink.

Normally it is better to get all extended attributes from a file in one go by calling getxattrs. However some Linux filesystem implementations are buggy and do not provide a way to list out attributes. For these filesystems (notably ntfs-3g) you have to know the names of the extended attributes you want in advance and call this function.

Extended attribute values are blobs of binary data. If there is no extended attribute named name, this returns an error.

See also: lgetxattrs, getxattr, attr(5).

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

Parameters:

this

A GuestfsSession object

size_r

The size of the returned buffer, in bytes

Returns:

an array of binary data, or NULL on error




2022 vala-language.org