The File I/O API
21
Returns
A string that contains a hexadecimal number that represents the number of time units that
have elapsed since some base time. The exact meaning of time units and base time is
platform-dependent; in Windows, for example, a time unit is 100ns, and the base time is
January 1st, 1600.
Example
It’s useful to call the function twice and compare the return values because the value that this
function returns is platform-dependent and is not a recognizable date and time. The
following code example gets the modification dates of file1.txt and file2.txt and displays an
alert message that indicates which file is newer:
var file1 = "file:///c|/temp/file1.txt";
var file2 = "file:///c|/temp/file2.txt";
var time1 = DWfile.getModificationDate(file1);
var time2 = DWfile.getModificationDate(file2);
if (time1 == time2){
alert("file1 and file2 were saved at the same time");
}else if (time1 < time2){
alert("file1 older that file2");
}else{
alert("file1 is newer than file2");
}
DWfile.getCreationDate()
Availability
Dreamweaver 4.
Description
This function gets the time when the file was created.
Arguments
fileURL
■
The
fileURL
argument, which is expressed as a file:// URL, is the file for which you are
checking the creation time.
Returns
A string that contains a hexadecimal number that represents the number of time units that
have elapsed since some base time. The exact meaning of time units and base time is
platform-dependent; in Windows, for example, a time unit is 100ns, and the base time is
January 1st, 1600.
000_DW_API_Print.book Page 21 Wednesday, July 20, 2005 11:58 AM
Summary of Contents for DREAMWEAVER 8-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 16: ......
Page 28: ...28 The File I O API...
Page 38: ...38 The HTTP API...
Page 68: ...68 Flash Integration...
Page 100: ...100 The Database API...
Page 116: ...116 The JavaBeans API...
Page 144: ...144 The Source Control Integration API...
Page 146: ......
Page 254: ...254 Workspace...
Page 298: ...298 Site...
Page 354: ...354 Document...
Page 396: ...396 Page Content...
Page 488: ...488 Design...
Page 550: ...550 Code...