Adobe 38040334 - Dreamweaver CS3 User Manual page 13

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

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:
if the file exists;
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.
Description
This function gets the attributes of the specified file or folder.
Arguments
fileURL
• The
argument, which is expressed as a file:// URL, is the file or folder for which you want to get
fileURL
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
value. The following characters in the string represent the attributes:
null
is read only.
R
is folder.
D
is hidden.
H
is system file or folder.
S
Example
The following code gets the attributes of the mydata.txt file and displays an alert box if the file is read only:
otherwise.
false
DREAMWEAVER CS3
8
API Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents