int fstat(int fd, struct stat *buf)


Method Description

This function is used to get information about a file or directory descriptor.

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.

See also :

Stats a file/directory. URLs are accepted. Works as its standard equivalent.
int stat(const char *filename, struct stat *buf)

Copyright © Nicolas Brodu, 1999 - 2000