stat64_time64()--Get File Information (large file and time64_t enabled)
Syntax
#include <sys/stat.h> int stat64_time64(const char *path, struct stat64_time64 *buf);Service Program Name: QP0LLIB1
Default Public Authority: *USE
Threadsafe: Conditional; see Usage Notes.
The stat64_time64() function gets status information about a specified file and places it in the area of memory pointed to by the buf argument.
If the named file is a symbolic link, stat64_time64() resolves the symbolic link. It also returns information about the resulting file.
stat64_time64() is enabled for large files. It is capable of operating on files larger than 2GB minus 1 byte and returning correct sizes.
For additional information about authorities required, error conditions, and examples, see stat()--Get File Information.
Parameters
- path
- (Input) A pointer to the null-terminated path name of the file from which
information is required.
This parameter is assumed to be represented in the CCSID (coded character set identifier) currently in effect for the job. If the CCSID of the job is 65535, this parameter is assumed to be represented in the default CCSID of the job.
See QlgStat64_time64()--Get File Information (large file and time64_t enabled and using NLS-enabled path name) for a description and an example of supplying the path in any CCSID.
- buf
- (Output) A pointer to the area to which the information should be written.
The information is returned in a stat64_time64 structure, as defined in the <sys/stat.h> header file. This structure is identical to the stat64 structure except for the following:
- The st_atime, st_mtime, and st_ctime fields are defined by the 8-byte time64_t data type instead of the 4-byte time_t data type.
- The order of the st_ino_gen_id and st_allocsize fields is reversed.
- The st_reserved2 field is reduced to 1 byte.
- The st_reserved1 field is reduced to 14 bytes.
Related Information
- stat()--Get File Information
- stat64()--Get File Information (large file enabled)
- QlgStat64_time64()--Get File Information (large file and time64_t enabled with NLS-enabled path name)
Usage Notes
- When you develop in C-based languages, the prototypes for the 64-bit APIs
are normally hidden. To use either the stat64_time64() API or the
QlgStat64_time64() API and the struct stat64_time64 data type,
you must compile the source with _LARGE_FILE_API defined.
- While the st_atime, st_mtime, and st_ctime fields are time64_t fields, the API will
not return time values beyond what can be contained in a time_t field.
- All of the usage notes for stat() also apply to stat64_time64() and to QlgStat64_time64(). See Usage Notes in the stat() API.
API introduced: IBM® i 7.2