#include <oskit/io/posixio.h>OSKIT_COMDECL oskit_posixio_stat(oskit_posixio_t *f, [out] oskit_stat_t *out_stats);
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_t dev; /* device on which inode resides */ oskit_ino_t ino; /* inode's number */ oskit_mode_t mode; /* file mode */ oskit_nlink_t nlink; /* number of hard links to file */ oskit_uid_t uid; /* user id of owner */ oskit_gid_t gid; /* group id of owner */ oskit_dev_t rdev; /* device number, for device files */ oskit_timespec_t atime; /* time of last access */ oskit_timespec_t mtime; /* time of last data modification */ oskit_timespec_t ctime; /* time of last attribute change */ oskit_off_t size; /* size in bytes */ oskit_u64_t blocks; /* blocks allocated for file */ oskit_u32_t blksize; /* optimal block size in bytes */
};
- f
- The object whose attributes are desired.
- out_stats
- The attributes of the specified object.
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.