DWfile.read()

Availability

Dreamweaver 2.

Description

This function reads the contents of the specified file into a string.

Arguments

fileURL

Returns

A string that contains the contents of the file or a null value if the read fails.

Example

The following code reads the mydata.txt file and, if it is successful, displays an alert message with the contents of the file:

var fileURL = "file:///c|/temp/mydata.txt";
var str = DWfile.read(fileURL);
if (str){
   alert(fileURL + " contains: " + str);
}

 

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

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