![MACROMEDIA DREAMWEAVER MX 2004-DREAMWEAVER API Reference Download Page 35](http://html1.mh-extra.com/html/macromedia/dreamweaver-mx-2004-dreamweaver-api/dreamweaver-mx-2004-dreamweaver-api_reference_3336554035.webp)
The File I/O API
35
DWfile.exists()
Availability
Dreamweaver 2.
Description
This function tests for the existence of the specified file.
Arguments
fileURL
•
The
fileURL
argument, which is expressed as a file:// URL, is the requested file.
Returns
A Boolean value:
true
if the file exists;
false
otherwise.
Example
The following code checks for the mydata.txt file and displays an alert message that tells the user
whether the file exists:
var fileURL = "file:///c|/temp/mydata.txt";
if (DWfile.exists(fileURL)){
alert(f " exists!");
}else{
alert(f " does not exist.");
}
DWfile.getAttributes()
Availability
Dreamweaver 2.
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.
000_DW_API_Print.book Page 35 Wednesday, August 20, 2003 9:14 AM
Summary of Contents for DREAMWEAVER MX 2004-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 24: ...24 Contents...
Page 32: ......
Page 70: ...70 Chapter 5 Fireworks Integration...
Page 76: ...76 Chapter 6 Flash Integration...
Page 116: ...116 Chapter 9 The JavaBeans API...
Page 140: ......
Page 152: ...152 Chapter 11 Application...
Page 218: ...218 Chapter 12 Workspace...
Page 248: ...248 Chapter 13 Site...
Page 292: ...292 Chapter 14 Document...
Page 378: ...378 Chapter 17 Design...
Page 430: ...430 Chapter 18 Code...
Page 486: ...486 Index...