#include <sys/types.h>
#include <sys/stat.h>
int stat(const char *path, struct stat *buf);
The stat() function obtains information about the named file and
writes it to the area pointed to by the buf argument. The path
argument points to a pathname naming a file. Read, write or execute
permission of the named file is not required, but all directories
listed in the pathname leading to the file must be searchable. An
implementation that provides additional or alternate file access
control mechanisms may, under implementation-dependent conditions,
cause stat() to fail.