next up previous contents index
Next: 5.6.2 setstat: Set the Up: 5.6 oskit_posixio: POSIX I/O Previous: 5.6 oskit_posixio: POSIX I/O

5.6.1 stat: Get attributes of this object

 

SYNOPSIS

#include <oskit/io/posixio.h>

OSKIT_COMDECL oskit_posixio_stat(oskit_posixio_t *f, [out] oskit_stat_t *out_stats);

DESCRIPTION

This method returns the attributes of this object. Depending on the type of object, only some of the attributes may be meaningful. out_stats is a pointer to a oskit_stat_t structure defined as follows:

struct oskit_stat {

 oskit_dev_tdev;/* device on which inode resides */
 oskit_ino_tino;/* inode's number */
 oskit_mode_tmode;/* file mode */
 oskit_nlink_tnlink;/* number of hard links to file */
 oskit_uid_tuid;/* user id of owner */
 oskit_gid_tgid;/* group id of owner */
 oskit_dev_trdev;/* device number, for device files */
 oskit_timespec_tatime;/* time of last access */
 oskit_timespec_tmtime;/* time of last data modification */
 oskit_timespec_tctime;/* time of last attribute change */
 oskit_off_tsize;/* size in bytes */
 oskit_u64_tblocks;/* blocks allocated for file */
 oskit_u32_tblksize;/* optimal block size in bytes */

};

PARAMETERS

f
The object whose attributes are desired.
out_stats
The attributes of the specified object.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.


next up previous contents index
Next: 5.6.2 setstat: Set the Up: 5.6 oskit_posixio: POSIX I/O Previous: 5.6 oskit_posixio: POSIX I/O

University of Utah Flux Research Group