modDateChanged
Returns whether file has been modified since a certain date.
Method of
FileSyntax
boolean modDateChanged (FileSpecObject aSourceFolder, Number anOldDate);Parameters
The
modDateChangedmethod has the following parameters:Returns
A boolean value indicating whether the file has been modified since the input date or has not.
Description
Most often, the date passed in as the second parameter in modDateChanged is the returned value from a modDate on a separate file, as in the following example, in which the dates of two files are compared.
Example
fileSource1 = getFolder("Program", "file1.txt"); fileSource2 = getFolder("Program", "file2.txt"); err1 = File.modDate(fileSource1); // the baseline returned //'time stamp' value err2 = File.modDateChanged(fileSource1, err1); logComment("File.modDateChanged should return 'false' = " + err2); // the reason it expects false is we're comparing // the return 'time stamp' value for // file1.txt with the actual file1.txt itself. // Thus, no change in 'time stamp' values. err3 = File.modDateChanged(fileSource2, err1); logComment("File.modDateChanged should return 'true' = " + err2); // the reason it expects true is we're comparing // the return 'time stamp' value for // file1.txt with another file, file2.txt, with a different // 'time stamp' value.
| Netscape Communications devedge.netscape.com |