fileFileStamp

Returns when a file was last written, as a number of seconds. Takes a filename. Returns the number of seconds from the start of 1970 to when the file was last written, or 0 if the file doesn't exist.

File IO

Parameters & Returns

Parameters

filename String

Returns

Int

Quick Summary

Returns when a file was last written, as a number of seconds. Takes a filename. Returns the number of seconds from the start of 1970 to when the file was last written, or 0 if the file doesn't exist.

Technical Exegesis...

Returns when the file was last written (changed), as the number of seconds from the start of 1 January 1970 (UTC). Returns 0 if the file doesn't exist. The file doesn't need to be open.

The number is for comparing: the file with the bigger stamp was written more recently, and the difference between two stamps is the number of seconds between them. For showing to a player, use fileFileDate and fileFileTime.

Copying a file with fileCopyFile keeps its time.

Web: a file saved before version 1.

Example

Example.bam
; Which save is newer?
If fileFileStamp("slot1.sav") > fileFileStamp("slot2.sav") Then
    Print "Slot 1 is the newest"
Else
    Print "Slot 2 is the newest"
EndIf