Skip to main content

getxattr_query

Function getxattr_query 

Source
pub fn getxattr_query<P: Arg, Name: Arg>(path: P, name: Name) -> Result<usize>
Expand description

getxattr(path, name, NULL, 0)—Query the length of an extended filesystem attribute.

This function uses getxattr with no buffer to just return the size of the attribute. This can be used to determine the size of a buffer to allocate for a subsequent call to getxattr, however keep in mind that other processes may modify attributes at any time.

§References