Jsbool mm_deleteconfigfile(), Calling a c function from javascript – Adobe Extending Dreamweaver CS4 User Manual
Page 370
364
EXTENDING DREAMWEAVER CS4
C-level extensibility
Returns
A Boolean value:
JS_TRUE
indicates success;
JS_FALSE
indicates failure.
Example
char *dwConfig = "file:///c|/Program Files/Adobe/Adobe Dreamweaver CS3
/Configuration/Objects";
MM_RemoveConfigFolder(dwConfig);
JSBool MM_DeleteConfigFile()
Availability
Dreamweaver MX.
Description
This function deletes the file, if it exists. If the file exists below the Dreamweaver Configuration folder, the function
marks the file for deletion in the mm_deleted_files.xml file.
If the fileURL argument does not specify a folder in the Dreamweaver Configuration folder, the function deletes the
specified file.
Arguments
char *fileURL
•
The char *fileURL argument is a pointer to a string that names the configuration folder to remove, which is
provided as 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/Objects/insertbar.xml";
MM_DeleteConfigFile(dwConfig);
Calling a C function from JavaScript
After you understand how C-level extensibility works in Dreamweaver and its dependency on certain data types and
functions, it’s useful to know how to build a library and call a function.
The following example requires the following five files, located in the Dreamweaver-application-folder/
Tutorial_assets/Extending folder as archives for both the Macintosh and Windows platforms:
•
extensibility and the JavaScript interpreter
•
The mm_jsapi_environment.h file defines the MM_Environment.h structure.
•
The MMInfo.h file provides access to the Design Notes API.