Get information about a file or directory
#include <sys/stat.h>
int fstatat( const int fd,
const char* path,
struct stat* buf,
int flags );
int fstatat64( const int fd,
const char* path,
struct stat64* buf,
int flags );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The fstatat() and fstatat64() functions obtain information about the file or directory referenced in path. This information is placed in the structure located at the address indicated by buf. The fstatat64() function is a large-file support version of fstatat().
The results of the fstatat() function are the same as the results of lstat() or stat(), depending on whether or not AT_SYMLINK_NOFOLLOW is set in the flags.
The same as stat(), as well as the following:
fstatat() is POSIX 1003.1; fstatat64() is Large-file support
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |