Please enable JavaScript to view this site.

ESL Documentation

FILEIO Subroutine

Gets the file modification time date stamp into a variable.

call GetModified(FILE_ID_IV, TIMESTAMP_SV)

FILE_ID_IV

A file identifier previously declared with the integer statement. This must be the same as the file identifier used when the file was opened.

TIMESTAMP_SV

A string variable to receive the time date stamp of when the file was last modified. The target string will not contain the information in the format: "DDD MMM DD HH:MM:SS YYYY\n",

where:

DDD

- first 3 characters of the day of the week


MMM

- first 3 characters of the month


DD

- 2 digit day of the month


HH

- 2 digit hours in 24 hour style


MM

- 2 digit minutes


SS

- 2 digit seconds


YYYY

- 4 digit year


\n

- New line character.

Description

Whenever a file is created or updated, the operating system records the exact time of the modification.

The GetModified subroutine allows your application to determine when a file has been modified by another application.

Errors

FIO_E_NOTOPEN

File has not been opened.

FIO_E_OPENFORWRITE

Modified information not available for a file opened for writing.

Example

string FileName is "input.txt"

string Read is "read"

string TimeStamp

integer FileID

include "fileio.inc"

 

response to start

 call OpenFile (FileID, FileName, Read)

 call GetModified (FileID, TimeStamp)

 send "File " FileName " was modified " TimeStamp to errorlog

 call CloseFile (FileID)