MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Reference page 27

Dreamweaver api reference
Table of Contents

Advertisement

Arguments
fileURL, text, {mode}
The
argument, which is expressed as a file:// URL, is the file to which you are
fileURL
writing.
The
argument is the string to be written.
text
The
argument, if it is supplied, must be
mode
contents of the file are overwritten by the string.
Returns
A Boolean value:
true
Example
The following code attempts to write the string
alert message if the write operation succeeds. It then tries to append the string
file and displays a second alert if the write succeeds. After executing this script, the mydata.txt
file contains the text
var fileURL = "file:///c|/temp/mydata.txt";
if (DWfile.write(fileURL, "xxx")){
alert("Wrote xxx to " + fileURL);
}
if (DWfile.write(fileURL, "aaa", "append")){
alert("Appended aaa to " + fileURL);
}
if the string is successfully written to the file;
and nothing else.
xxxaaa
. If this argument is omitted, the
"append"
false
to the mydata.txt file and displays an
"xxx"
otherwise.
to the
"aaa"
The File I/O API
27

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER 8-DREAMWEAVER API and is the answer not in the manual?

This manual is also suitable for:

Dreamweaver 8

Table of Contents