Adobe 38040334 - Dreamweaver CS3 User Manual page 16

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

Advertisement

Returns
A JavaScript
object that represents the date and time when the specified file was last modified.
Date
DWfile.getSize()
Availability
Dreamweaver MX.
Description
This function gets the size of a specified file.
Arguments
fileURL
• The
argument, which is expressed as a file:// URL, is the file for which you are checking the size.
fileURL
Returns
An integer that represents the actual size, in bytes, of the specified file.
DWfile.listFolder()
Availability
Dreamweaver 2.
Description
This function gets a list of the contents of the specified folder.
Arguments
folderURL, {constraint}
• The
argument is the folder for which you want a contents list, which is expressed as a file:// URL, plus
folderURL
an optional wildcard file mask. Valid wildcards are asterisks (*), which match one or more characters, and
question marks (?), which match a single character.
• The
argument, if it is supplied, must be either
constraint
(return only folders). If it is omitted, the function returns files and folders.
Returns
An array of strings that represents the contents of the folder.
Example
The following code gets a list of all the text (TXT) files in the C:/temp folder and displays the list in an alert message:
var folderURL = "file:///c|/temp";
var fileMask = "*.txt";
var list = DWfile.listFolder(folderURL + "/" + fileMask, "files");
if (list){
alert(folderURL + " contains: " + list.join("\n"));
}
(return only files) or
"files"
DREAMWEAVER CS3
API Reference
"directories"
11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents