Portability Function: Sets the modification time for a specified file.
Module: USE IFPORT
Syntax
result = SETFILETIMEQQ (filename, timedate)
filename
(Input) Character*(*). Name of a file.
timedate
(Input) INTEGER(4). Time and date information, as packed by PACKTIMEQQ.
Results
The result type is LOGICAL(4). The result is .TRUE. if successful; otherwise, .FALSE..
The modification time is the time the file was last modified and is useful for keeping track of different versions of the file. The process that calls SETFILETIMEQQ must have write access to the file; otherwise, the time cannot be changed. If you set timedate to FILE$CURTIME (defined in IFPORT.F90
), SETFILETIMEQQ sets the modification time to the current system time.
If the function fails, call GETLASTERRORQQ to determine the reason. It can be one of the following:
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB
See Also
PACKTIMEQQ, UNPACKTIMEQQ, GETLASTERRORQQ
Example
USE IFPORT
INTEGER(2) day, month, year
INTEGER(2) hour, minute, second, hund
INTEGER(4) timedate
LOGICAL(4) result
CALL GETDAT(year, month, day)
CALL GETTIM(hour, minute, second, hund)
CALL PACKTIMEQQ (timedate, year, month, day, &
hour, minute, second)
result = SETFILETIMEQQ('myfile.dat', timedate)
END