int fstat(int
fd, struct stat *buf)
fd is an already opened file or directory descriptor. This must be a descriptor returned by the library functions, and not by the standard ones.
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.
Copyright © Nicolas Brodu, 1999 - 2000