User Guide
File Access and Multiuser Configuration API 365
C-level extensions, or shared libraries, must use the File Access and Multiuser Configuration API
to read and write to the Dreamweaver Configuration folder. Using the File Access and Multiuser
Configuration API lets Dreamweaver read and write to the user Configuration folder and ensures
that the file operations do not fail due to insufficient access privileges. If your C-level extension
accesses files in the Dreamweaver Configuration folder that were created through JavaScript
with DWFile, MMNotes, or DOM manipulations, it is essential that you use the File Access
and Multiuser Configuration API because these files might be located in the user
Configuration folder.
Note: Most JavaScript extensions do not need to be changed to write to the user Configuration
folder. Only C shared libraries that write to the Configuration folder need to be updated to use the File
Access and Multiuser Configuration API functions.
When you delete a file from the Dreamweaver Configuration folder, Dreamweaver adds an entry
to a mask file to indicate which files in the Configuration folder should not appear in the user
interface. A masked file or folder does not appear to exist to Dreamweaver although it might
physically exist in the folder.
For example, if you use the trash can icon in the Snippets panel to delete a Snippets folder called
javascript and a file called onepixelborder.csn, Dreamweaver writes a file in the user
Configuration folder called mm_deleted_files.xml, which looks like the following example:
<?xml version = "1.0" encoding="utf-8" ?>
<deleteditems>
<item name="snippets/javascript/" />
<item name="snippets/html/onepixelborder.csn" />
</deleteditems>
As Dreamweaver populates the Snippets panel, it reads all the files in the user’s Configuration/
Snippets folder and all the files in the Dreamweaver Configuration/Snippets folder, except the
Configuration/Snippets/javascript folder and the Configuration/Snippets/html/
onepixelborder.csn file, and it adds the resulting list of files to the Snippets panel list.
If a C-level extension calls the
MM_ConfigFileExists() function for the file:///c|Program Files/
Macromedia/Dreamweaver/Configuration/Snippets/javascript/onepixelborder.csn URL, it
returns a value of
false. Likewise, if a JavaScript extension tries to call
dw.getDocumentDom("file:///c|Program Files/Macromedia/Dreamweaver/
Configuration/Snippets/javascript/onepixelborder.csn")
, it returns a null value.
You can modify the mm_deleted_files.xml file to prevent Dreamweaver from showing files in the
user interface, such as objects, canned content in the new dialog box, and so on. You can call the
MM_DeleteConfigfile() function to add file paths to the mm_deleted_files.xml file.
JS_Object MM_GetConfigFolderList()
Availability
Dreamweaver MX.
Description
This function gets a list of files, folders, or both for the specified folder. If you specify a
configuration folder, the function gets a list of the folders that exists in both the user
Configuration folder and the Dreamweaver Configuration folder, subject to filtering by the
mm_deleted_files.xml file.