#include <oskit/io/posixio.h>OSKIT_COMDECL oskit_posixio_setstat(oskit_posixio_t *f, oskit_u32_t mask, const oskit_stat_t *stat);
This method sets the attributes specified in mask to the values specified in stat. mask may be any combination of the following:
- OSKIT_STAT_MODE
- Set the file mode, except for the file type bits, as in the Unix chmod system call.
- OSKIT_STAT_UID
- Set the file user id, as in the Unix chown system call.
- OSKIT_STAT_GID
- Set the file group id, as in the Unix chown system call.
- OSKIT_STAT_SIZE
- Set the file size, as in the Unix truncate system call.
- OSKIT_STAT_ATIME
- Set the file's last access timestamp to a particular value, as in the Unix utimes system call with a non-NULL parameter.
- OSKIT_STAT_MTIME
- Set the file's last data modification timestamp to a particular value, as in the Unix utimes system call with a non-NULL parameter.
- OSKIT_STAT_UTIMES_NULL
- Set the file's last access timestamp and data modification timestamp to the current time, as in the Unix utimes system call with a NULL parameter.
Typically, this method is not supported for symbolic links.
- f
- The object whose attributes are to be changed.
- mask
- The attributes to be changed.
- stat
- The new attribute values.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.