INtime SDK Help
fstat

Gets information on the file associated with the specified file descriptor.

#include <sys/types.h>
#include <sys/stat.h>

int fstat (int handle, struct stat *buffer);

int _fstat64 (int handle, struct stat64 *buffer);

Parameters

handle
Descriptor referring to an open file.
buffer
Pointer to an ANSI file-status structure stat. struct stat64 describes the file size as a 64 bit value.

Remarks

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.

Return Values

0 (zero).
Success.
-1 and the function sets errno to EBADF, indicating an invalid file descriptor.
Failure.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/sys/stat.h sys/types.h
sys/stat.h
clib.lib
See Also