Specifications

Chapter 22276
DWfile.getSize()
Availability
Dreamweaver MX
Description
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.
Returns
An integer that represents the actual size, in bytes, of the specified file.
DWfile.listFolder()
Availability
Dreamweaver 2
Description
Gets a list of the contents of the specified folder.
Arguments
folderURL {,constraint}
The first argument is the folder for which you want a contents list, which is expressed as a
file:// URL, plus an optional wildcard file mask. Valid wildcards are asterisks (*), which match
1 or more characters and question marks (?), which match a single character.
The second argument, if supplied, must be either "files" (return only files) or
"directories" (return only directories). If it is omitted, the function returns files and
directories.
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 temp folder and displays the list in an
alert box.
var folderURL = "file:///c|/temp";
var fileMask = "*.txt";
var list = DWfile.listFolder(folderURL + "/" + fileMask, "files");
if (list){
alert(folderURL + " contains: " + list.join("\n"));
}