Returns the date a file was last written.
Takes a filename.
Returns the date in the same form as sysCurrentDate ("04 Nov 2026"), in local time, or "" if the file doesn't exist.
File IO
Parameters & Returns
Parameters
filenameString
Returns
String
Quick Summary
Returns the date a file was last written.
Takes a filename.
Returns the date in the same form as sysCurrentDate ("04 Nov 2026"), in local time, or "" if the file doesn't exist.
Technical Exegesis...
Returns the date the file was last written (changed), in the same form as sysCurrentDate: "DD MMM YYYY", for example "04 Nov 2026", in local time. Returns "" if the file doesn't exist. The file doesn't need to be open. Works for folders as well on desktop.
Use fileFileTime for the time of day, and fileFileStamp to compare two files or to work out how old one is.
Web: files are kept by the browser, and the time is recorded whenever one is written. A file saved before version 1.
Returns the date the file was last written (changed), in the same form as sysCurrentDate: "DD MMM YYYY", for example "04 Nov 2026", in local time. Returns "" if the file doesn't exist. The file doesn't need to be open. Works for folders as well on desktop.
Use fileFileTime for the time of day, and fileFileStamp to compare two files or to work out how old one is.
Web: files are kept by the browser, and the time is recorded whenever one is written. A file saved before version 1.2g has no time until it's written again, and gives "".
PlayStation: there's no clock, so times count on from when the disc was built, as sysCurrentDate does. Files on the CD give the build time. Files written to the memory card keep their time on the card.
Example
Example.bam
Local f:Int = fileWriteFile("save.dat")
fileWriteLine(f, "level 3")
fileCloseFile(f)
Print "Saved on " & fileFileDate("save.dat") & " at " & fileFileTime("save.dat")