Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]

Method setxattr()


Method setxattr

void setxattr(string file, string attr, string value, int flags, void|int(0..1) symlink)

Description

Set the attribute attr to the value value .

The flags parameter can be used to refine the semantics of the operation.

Stdio.XATTR_CREATE specifies a pure create, which fails if the named attribute exists already.

Stdio.XATTR_REPLACE specifies a pure replace operation, which fails if the named attribute does not already exist.

By default (no flags), the extended attribute will be created if need be, or will simply replace the value if the attribute exists.

Returns

1 if successful, 0 otherwise, setting errno.