|
VMS Help CRTL, fstat, Description *Conan The Librarian |
The fstat function does not work on remote network files.
Be aware that for the stat_t structure member st_size to report a
correct value, you need to flush both the C RTL and RMS buffers.
NOTE (Integrity servers, Alpha)
On OpenVMS Alpha and Integrity server systems, the stat,
fstat, utime, and utimes functions have been enhanced to
take advantage of the new file-system support for POSIX
compliant file timestamps.
This support is available only on ODS-5 devices on OpenVMS
Alpha and Integrity servers systems beginning with a version
of OpenVMS Alpha after Version 7.3.
Before this change, the stat and fstat functions were
setting the values of the st_ctime, st_mtime, and st_atime
fields based on the following file attributes:
st_ctime - ATR$C_CREDATE (file creation time)
st_mtime - ATR$C_REVDATE (file revision time)
st_atime - was always set to st_mtime because no support
for file access time was available
Also, for the file-modification time, utime and utimes were
modifying the ATR$C_REVDATE file attribute, and ignoring the
file-access-time argument.
After the change, for a file on an ODS-5 device, the stat
and fstat functions set the values of the st_ctime, st_
mtime, and st_atime fields based on the following new file
attributes:
st_ctime - ATR$C_ATTDATE (last attribute modification
time)
st_mtime - ATR$C_MODDATE (last data modification time)
st_atime - ATR$C_ACCDATE (last access time)
If ATR$C_ACCDATE is zero, as on an ODS-2 device, the stat
and fstat functions set st_atime to st_mtime.
For the file-modification time, the utime and utimes
functions modify both the ATR$C_REVDATE and ATR$C_MODDATE
file attributes. For the file-access time, these functions
modify the ATR$C_ACCDATE file attribute. Setting the ATR$C_
MODDATE and ATR$C_ACCDATE file attributes on an ODS-2 device
has no effect.
For compatibility, the old behavior of stat, fstat, utime,
and utimes remains the default, regardless of the kind of
device.
The new behavior must be explicitly enabled at run time
by defining the DECC$EFS_FILE_TIMESTAMPS logical name to
"ENABLE" before invoking the application. Setting this
logical does not affect the behavior of stat, fstat, utime
and utimes for files on an ODS-2 device.
|
|