Dreamweaver.getdocumentpath(), Dreamweaver.getsiteroot() – Adobe Dreamweaver API Reference CS5 User Manual
Page 278

273
DREAMWEAVER API REFERENCE
Document
Last updated 8/27/2013
Arguments
None.
Returns
The path to the application configurations.
Example
The following function is useful when referencing other extension files, which are stored in the Configuration folder
in the Dreamweaver application folder:
var sortCmd = dreamweaver.getConfigurationPath() + ¬
"/Commands/Sort Table.htm"
var sortDOM = dreamweaver.getDocumentDOM(sortCmd);
dreamweaver.getDocumentPath()
Availability
Dreamweaver 1.2.
Description
Gets the path of the specified document, which is expressed as a file:// URL. This function is equivalent to calling
dreamweaver.getDocumentDOM()
and reading the
URL
property of the return value.
Arguments
sourceDoc
•
The value of the sourceDoc argument must be
"document"
,
"parent"
,
"parent.frames[number]"
, or
"parent.frames['frameName']"
. The
"document"
value specifies the document that has the focus and contains
the current selection. The
"parent"
value specifies the parent frameset (if the currently selected document is in a
frame), and the
"parent.frames[number]"
and
"parent.frames['frameName']"
values specify a document
that is in a particular frame within the frameset that contains the current document.
Returns
Either a string that contains the URL of the specified document if the file was saved or an empty string if the file was
not saved.
dreamweaver.getSiteRoot()
Availability
Dreamweaver 1.2.
Description
Gets the local root folder (as specified in the Site Definition dialog box) for the site that is associated with the currently
selected document, which is expressed as a file:// URL.
Arguments
None.