Obtains statistics for the file system (volume) specified by a file descriptor.
#include <sys/statfs.h> int fstatfs ( int fildes, struct statfs *buf );
(IN) Specifies a file descriptor on which a file is opened on the volume from which to gather statistics.
(OUT) Points to the address of the structure statfs.
If successful, returns 0. Otherwise, returns -1 and sets errno to one of the following:
The fstatfs function obtains statistics about the file system specified by the file descriptor. This information is placed in the structure located at the address indicated by the buf parameter.
The sys/statfs.h header file contains definitions for the statfs structure and the fields are described in statfs.
IMPORTANT:This function returns information only for traditional and NSS volumes which are mounted. It does not currently return information about the DOS partition.