20
The File I/O API
Description
This function gets the attributes of the specified file or folder.
Arguments
fileURL
■
The
fileURL
argument, which is expressed as a file:// URL, is the file or folder for which
you want to get attributes.
Returns
A string that represents the attributes of the specified file or folder. If the file or folder does
not exist, this function returns a
null
value. The following characters in the string represent
the attributes:
■
R
is read only.
■
D
is folder.
■
H
is hidden.
■
S
is system file or folder.
Example
The following code gets the attributes of the mydata.txt file and displays an alert box if the file
is read only:
var fileURL = "file:///c|/temp/mydata.txt";
var str = DWfile.getAttributes(fileURL);
if (str && (str.indexOf("R") != -1)){
alert(f " is read only!");
}
DWfile.getModificationDate()
Availability
Dreamweaver 2.
Description
This function gets the time when the file was last modified.
Arguments
fileURL
■
The
fileURL
argument, which is expressed as a file:// URL, is the file for which you are
checking the last modified time.
000_DW_API_Print.book Page 20 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...