Gets information on the file associated with the specified file descriptor.
#include <sys/types.h> #include <sys/stat.h> /* 32 bit file size and 32 time */
int fstat (int handle, struct stat *buffer); /* 64 bit file size and 32 bit time */
int _fstat64 (int handle, struct stat64 *buffer); /* 64 bit file size and 64 bit time */
int _fstat64x64 (int handle, struct stat64x64 *buffer);
handle
buffer
The file-status structure stat is defined in sys/stat.h.
If handle refers to a device, the size and time elements in the stat structure are not meaningful.
This function performs a translation of real-time OS file ownership rights and RT OS access rights to POSIX as described in sys/stat.h.
fstat() is always 32 bit.
If you need to force the compiler to interpret time_t as the new 64-bit time_t, you can define _USE_64BIT_TIME_T. If _USE_64BIT_TIME_T is defined: _fstat(64) behaves like _fstat64x64. This is recommended to ensure that your application does not fail after January 18, 2038, but is not backwards-compatible with previous versions of INtime.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/sys/stat.h | sys/types.h sys/stat.h |
clib.lib |