SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
int fstat(int fildes, struct stat *buf);
int lstat(const char *pathname, struct stat *buf);
int stat(const char *pathname, struct stat *buf);
int fstat64(int fildes, struct stat64 *buf);
int lstat64(const char *pathname, struct stat64 *buf);
int stat64(const char *pathname, struct stat64 *buf);
DESCRIPTION
The
The
The
The
PARAMETERS
- pathname
-
Points to a path name that names a file. The calling process must have at least search permissions on pathname.
- fildes
-
Is a file descriptor referring to a file for which status is returned.
- buf
-
Points to a stat or stat64 structure where status information about the file is to be placed.
RETURN VALUES
If successful, these functions return a value of zero. On failure, they return -1 and set errno to one of the following values:
- EACCES
-
The permissions that a mode specified are denied or search permission is denied on a component of the path name prefix.
- EBADF
-
fildes is not a valid open file descriptor.
- EFAULT
-
buf or pathname is an invalid pointer.
- EINTR
-
A signal interrupted the call.
- EINVAL
-
The file time returned by the system cannot be represented.
- ENAMETOOLONG
-
The length of the pathname parameter exceeds PATH_MAX or a path name component is longer than NAME_MAX.
- ENOENT
-
pathname points to an empty string or to the name of a file that does not exist.
- ENOTDIR
-
A component of the path name prefix is not a directory.
- EOVERFLOW
-
The file size, in bytes or the number of blocks allocated to the file, or the file serial number cannot be represented correctly in the structure pointed to by buf.
CONFORMANCE
MULTITHREAD SAFETY LEVEL
PORTING ISSUES
There are differences in how the NuTCRACKER Platform fills in the stat structure, compared to the referenced standard. Refer to the struct stat page, and to File Management in the Windows Concepts chapter of the PTC MKS Toolkit UNIX to Windows Porting Guide.
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:
_NutFastStat() ,chmod() ,chown() ,creat() ,link() ,open() ,read() ,readlink() ,symlink() ,unlink() ,utime() ,write()
- Miscellaneous:
- lf64, struct stat
PTC MKS Toolkit 10.4 Documentation Build 39.