File Access And Multiuser Configuration Api - Adobe 38040334 - Dreamweaver CS3 User Manual

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

DREAMWEAVER CS3
355
Extending Dreamweaver

File access and multiuser configuration API

Adobe recommends that you always use the file access and multiuser configuration API to access the file system
through C-level extensions. For files other than configuration files, the functions access the specified file or folder.
Dreamweaver supports multiple-user configurations for the Windows XP, Windows 2000, and Mac OS X operating
systems.
Typically, you install Dreamweaver in a restricted folder such as C:\Program Folders in Windows. As a result, only
users with Administrator privileges can make changes in the Dreamweaver Configuration folder. To enable users on
multiuser operating systems to create and maintain individual configurations, Dreamweaver creates a separate
Configuration folder for each user. Whenever Dreamweaver or a JavaScript extension writes to the Dreamweaver
Configuration folder, Dreamweaver automatically writes to the user Configuration folder instead. This process lets
each user customize Dreamweaver configuration settings without disturbing the customized configurations of other
users.
Dreamweaver creates the user Configuration folder in a location where the user has full read and write access. The
location of the user's Configuration folder depends on the user's platform.
For Windows 2000 and Windows XP platforms:
<drive>:\Documents and Settings\<username>\Application Data\Adobe\¬
Dreamweaver 9\Configuration
Note: In Windows XP, this folder may be inside a hidden folder.
For Mac OS X platforms:
<drive>:Users:<username>:Library:Application Support:Adobe:Dreamweaver 9:Configuration
There are many cases where JavaScript extensions open files and write to the Configuration folder. JavaScript exten-
sions can access the file system by using DWFile or MMNotes, or by passing a URL to the
function. When an extension accesses the file system in a Configuration folder,
dreamweaver.getDocumentDOM()
it generally uses the
function and adds the filename, or it gets the path by accessing
dw.getConfigurationPath()
the
property of an open document and adding the filename. An extension can also get the path by accessing
dom.URL
the
and stripping the filename. The
function and the
property
dom.URL
dw.getConfigurationPath()
dom.URL
always return a URL in the Dreamweaver Configuration folder, even if the document is located in the user Config-
uration folder.
Any time a JavaScript extension opens a file in the Dreamweaver Configuration folder, Dreamweaver intercepts the
access and checks the user Configuration folder first. If a JavaScript extension saves data to disk in the Dreamweaver
Configuration folder through DWFile or MMNotes, Dreamweaver intercepts the call and redirects it to the user
Configuration folder.
For example, in Windows 2000 or Windows XP, if the user asks for file:///C|/Program Files/Adobe/
Adobe Dreamweaver CS3/Configuration/Objects/Common/Table.htm, Dreamweaver searches for a Table.htm file
in the C:\Documents and Settings\username\adobe\Dreamweaver 9\Configuration\Objects\Common folder and, if
it exists, uses it instead.
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 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.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents