GetFileDate |
Files | |
Aptilis 1 |
GetFileDate(FileName)
GetFileDate returns the date of creation of the file you specified.
The value returned is the number of seconds elapsed since January 1, 1970.
Such functions as
fillTimeArray and
fillLocalTimeArray allow
you to transform this value into more explicit values for days,
months and years.
Return Value:
The date of creation if everything was OK.
-1 in case of error and the _errno variable contains more details about the error.
Example:
f = "c:\\windows\\tjmail.exe" $ t = getFileDate(f$) fillLocalTimeArray(time[], t) print(int(time[3])$, "/", int(time[4]+1)$, "/" ,int(time[5])$, "\n") print(int(time[2])$, ":", int(time[1])$, ":", int(time[0])$)Result:
13/1/1997 20:13:21 |
See also:
getFileLastModification,
fillLocalTimeArray.