Specifications
C-Level Extensibility 263
JSBool MM_ConfigFileExists()
Availability
Dreamweaver MX
Description
Checks whether the specified file exists. If it is a file in a configuration folder, this function checks 
to see if the file exists in the user Configuration folder or the Dreamweaver MX Configuration 
folder. The function also checks to see if the filename is listed in the mm_deleted_files.xml file. If 
the name is listed in this file, the function returns 
false.
Arguments
char *fileUrl is a pointer to a string that names the file for which you are checking, which is 
provided in the format of a file URL (file://). 
Returns
JSBool
Example
char *dwConfig = “file:///c|/Program Files/Macromedia/Dreamweaver MX/
Configuration/Extensions.txt”;
int fileno = 0;
if(MM_ConfigFileExists(dwConfig))
{
fileno = MM_OpenConfigFile(dwConfig, “read”);
}
int MM_OpenConfigFile()
Availability
Dreamweaver MX
Description
Opens the file and returns an operating system file handle. You can use the operating system file 
handle in calls to system file functions. You must close the file handle with a call to _close.
If the file is a configuration file, it finds the file in either the user Configuration folder or the 
Dreamweaver MX Configuration folder. If you open the configuration file for writing, the 
function creates the file in the user Configuration folder, even if it exists in the Dreamweaver MX 
Configuration folder.
Note: If you want to read the file before writing to it, open the file in "read" mode. When you want to write to the file, 
close the read handle and open the file again in "
write" or "append" mode.
Arguments
char *fileURL, char *mode
char *fileURL 
is a pointer to a string that names the file that you are opening, which is 
provided as a file URL (file://). If it specifies a path in the Dreamweaver MX Configuration 
folder, 
MM_OpenConfigFile() will resolve the path before opening the file.
char *mode is a string that specifies how you want to open the file. You can specify NULL, 
"
read", "write", or "append" mode. If you specify "write" and the file does not exist, 
MM_OpenconfigFile() creates it. If you specify "write", MM_OpenConfigFile() opens the file 
with an exclusive share. If you specify "
read", MM_OpenConfigFile() opens the file with a 
nonexclusive share.










