int stat(const char *filename, struct stat *buf)
This function is used to get information about a file/directory/URL
filename is a full URL.
buf points to a stat structure allocated by the user, which will contain information about the URL.
All the standard macros (ISDIR, ...) work fine on the resulting buffer. This method performs some conversions between DOS attributes and Unix permissions.
This function returns 0 on success and -1 on error with error() returning the corresponding error code.
Stats the file/directory corresponding to
this fd.
int fstat(int
fd, struct stat *buf)
Copyright © Nicolas Brodu, 1999 - 2000