Jsbool mm_configfileexists(), Int mm_openconfigfile() – Adobe Extending Dreamweaver CS4 User Manual
Page 366
360
EXTENDING DREAMWEAVER CS4
C-level extensibility
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/Adobe/Adobe Dreamweaver CS3/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/Adobe/Adobe Dreamweaver CS3/
Configuration/Extensions.txt";
int fileno = 0;
if(MM_ConfigFileExists(dwConfig))
{
fileno = MM_OpenConfigFile(dwConfig, "read");
}
int MM_OpenConfigFile()
Availability
Dreamweaver MX.
Description
This function 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 the system
_close
function.
If the file is a configuration file, it finds the file in either the user Configuration folder or the Dreamweaver
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 Configuration folder.