Example
The following code tries to create a folder called tempFolder at the top level of the C drive and
displays an alert box that indicates whether the operation was successful:
var folderURL = "file:///c|/tempFolder";
if (DWfile.createFolder(folderURL)){
alert("Created " + folderURL);
}else{
alert("Unable to create " + folderURL);
}
DWfile.exists()
Availability
Dreamweaver 2.
Description
This function tests for the existence of the specified file.
Arguments
fileURL
The
argument, which is expressed as a file:// URL, is the requested file.
fileURL
Returns
A Boolean value:
true
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(fileURL + " exists!");
}else{
alert(fileURL + " does not exist.");
}
DWfile.getAttributes()
Availability
Dreamweaver 2.
if the file exists;
false
otherwise.
The File I/O API
19
Need help?
Do you have a question about the DREAMWEAVER 8-DREAMWEAVER API and is the answer not in the manual?