SYNOPSIS
#include <nutc.h>
int _NutFastStat(const char *path, struct _NutFastStat *buf, size_t sizbuf);
struct _NutFastStat { off_t st_size; st_atime; time_t st_mtime; time_t st_ctime; int nut_st_flags; };
int _NutFastStat64(const char *path, struct _NutFastStat64 *buf, size_t sizbuf);
struct _NutFastStat64 { off64_t st_size; st_atime; time_t st_mtime; time_t st_ctime; int nut_st_flags; };
DESCRIPTION
The
The _NutFastStat structure contains the following fields:
- st_size
-
File size in bytes (if the file is a regular file).
- st_atime
-
Time of last access.
- st_mtime
-
Time of last data modification.
- st_ctime
-
Time of last file status change.
- nut_st_flags
-
File type. 0 if the file is a directory; 1 otherwise.
The
PARAMETERS
- path
-
Points to a null-terminated string that specifies a valid path to a directory or file.
- buf
-
Points to the _NutFastStat structure that receives the information about the directory or file.
- sizbuf
-
A size_t that is equal to sizeof(struct _NutFastStat) for
_NutFastStat() and sizeof(struct _NutFastStat64) for_NutFastStat64() . This parameter is provided to assure forward-compatibility with future versions that may extend the interface.
RETURN VALUES
On success,
- EACCES
-
The permissions that a mode specified are denied or search permission is denied on a component of the path name prefix.
- EFAULT
-
buf or path 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.
CONFORMANCE
PTC MKS Toolkit UNIX APIs extension.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
The
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
- Miscellaneous:
- struct stat
PTC MKS Toolkit 10.4 Documentation Build 39.