DWfile.exists()

Availability

Dreamweaver 2.

Description

This function tests for the existence of the specified file.

Arguments

fileURL

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(fileURL + " exists!");
}else{
   alert(fileURL + " does not exist.");
}

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/dreamweaver/8/apiref/02_file6.htm