Adobe 38040334 - Dreamweaver CS3 User Manual page 12

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

Advertisement

Description
This function copies the specified file to a new location.
Arguments
originalURL, copyURL
• The
argument, which is expressed as a file:// URL, is the file you want to copy.
originalURL
• The
argument, which is expressed as a file:// URL, is the location where you want to save the copied file.
copyURL
Returns
A Boolean value:
if the copy succeeds;
true
Example
The following code copies a file called myconfig.cfg to myconfig_backup.cfg:
var fileURL = "file:///c|/Config/myconfig.cfg";
var newURL ="file:///c|/Config/myconfig_backup.cfg";
DWfile.copy(fileURL, newURL);
DWfile.createFolder()
Availability
Dreamweaver 2.
Description
This function creates a folder at the specified location.
Arguments
folderURL
• The
argument, which is expressed as a file:// URL, is the location of the folder you want to create.
folderURL
Returns
A Boolean value:
if the folder is created successfully;
true
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.
otherwise.
false
otherwise.
false
DREAMWEAVER CS3
7
API Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents