fstatfs(), statfs()

get information about file system (deprecated) 

Function


SYNOPSIS

#include <sys/mount.h>

int fstatfs(int fildes, struct statfs *buf);

int statfs(const char *path, struct statfs *buf);


DESCRIPTION

Note:

The use of these functions is deprecated. You should use the fstatvfs() and statvfs() functions instead.

The fstatfs() and statfs() functions return information about a file system. The NuTCRACKER Platform recognizes the following file system types: NTFS, FAT, HPFS, CDFS, Joliet, VFAT, NFS and MVFS. buf is a pointer to a statfs structure (see <sys/mount.h>)

The concept of an inode does not exist on Windows. Consequently, members f_files (total inodes) and f_ffree (free inodes) always contain -1.


PARAMETERS

fildes 

Is the file descriptor for an open file on the file system to be queried.

path 

Specifies the path name of a file within the file system.

buf 

This is a result parameter that is filled in with the information of the file system.


RETURN VALUES

If successful, fstatfs() and statfs() return zero. On failure, they return -1 and set errno to one of the following values:

EACCES 

Search permission is denied for a component of the path prefix.

EBADF 

fildes is not a valid open file descriptor.

EFAULT 

buf or path is an invalid pointer.

EINVAL 

fildes or path refer to a file that does not reside on a physical file system.

ENAMETOOLONG 

The length of the path exceeds PATH_MAX.

ENODEV 

path refers to a drive letter that is not mounted.

ENOENT 

The named file does not exist.

ENOTDIR 

A component of the path prefix is not a directory.


CONFORMANCE

SVR4, with exceptions.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

Inodes do not exist on Windows. See the DESCRIPTION section.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
fstat(), fstatvfs(), stat(), statvfs()


PTC MKS Toolkit 10.1 Documentation Build 15.