setxattr

Modifies a file’s attributes and metadata.

Syntax

ssize_t setxattr (
   const char  *path,
   const char  *name,
   void        *value,
   size_t       size,
   int          flags
);

Parameters

path

In OES, this parameter is named file and points to the name of the file to modify attributes in.

name

Specifies the name of the extended attribute that you would like to get. The extended attribute will either be zNW_metadata_s or zNW_metadata2_s.

value

In OES, this parameter is named xattr and points to any one of the following structures:

  • the zNW_metadata_s structure, and it can be used only for eDirectory users.

  • the zNW_metadata2_s structure, and it can be used for both eDirectory and Active Directory users beginning with OES 2015.

size

In OES, this parameter represents the length of the value that is passed.

flags

Specifies the flag for modification. It can either be XATTR_CREATE or XATTR_REPLACE.