User Guide

366 Chapter 21: C-Level Extensibility
Arguments
char *fileURL, char *constraints
The char *fileUrl argument is a pointer to a string that names the folder for which you
want a list of the contents. The string must have the format of a file:// URL. The function
accepts valid wildcard characters of asterisks (*) and question marks (?) in the file:// URL
string. Use asterisks (*) to represent one or more unspecified characters, and question marks (?)
to represent a single unspecified character.
The char *contstraints argument can be "files" or "directories" or a null value. If
you specify
null, the MM_GetConfigFolderList() function returns files and folders.
Returns
JSObject
is an array that contains the list of files or folders in either the user Configuration folder
or the Dreamweaver Configuration folder, subject to filtering by the mm_deleted_files.xml file.
Examples
JSObject *jsobj_array;
jsobj_array = MM_GetConfigFolderList("file:///¬
c|/Program Files/Macromedia/Dreamweaver/Configuration", "directories" );
JSBool MM_ConfigFileExists()
Availability
Dreamweaver MX.
Description
This function checks whether the specified file exists. If it is a file in a configuration folder, the
function searches for the file in the user Configuration folder or the Dreamweaver Configuration
folder. The function also checks whether the filename is listed in the mm_deleted_files.xml file. If
the name is listed in this file, the function returns a
false value.
Arguments
char *fileUrl
The char *fileUrl argument is a pointer to a string that names the desired file, which is
provided in the format of a file:// URL.
Returns
A Boolean value: JS_TRUE indicates success; JS_FALSE indicates failure.
Example
char *dwConfig = “file:///c|/
Program Files/Macromedia/Dreamweaver/
Configuration/Extensions.txt”;
int fileno = 0;
if(MM_ConfigFileExists(dwConfig))
{
fileno = MM_OpenConfigFile(dwConfig, “read”);
}