Dom.siterelativetolocalpath(), Dreamweaver.comparefiles() – Adobe Dreamweaver API Reference CS5 User Manual
Page 222

217
DREAMWEAVER API REFERENCE
Site
Last updated 8/27/2013
Returns
A string, which specifies the site-relative URI.
Example
The following example returns
"/myWebApp/myFile.cfm"
, based on your site mappings and the HTTP address
specified in the Local Info section of the Site Definition dialog box.
var dom = dw.getDocumentDOM();
var siteRelativeURI =
dom.localPathToSiteRelative("C:\Inetpub\wwwroot\siteA\myWebApp\myFile.cfm")
dom.siteRelativeToLocalPath()
Availability
Dreamweaver 8.
Description
This function converts a site-relative URI reference to a local file path.
Arguments
siteRelativeURI
•
The siteRelativeURI attribute, which is required, is a string that contains the site-relative URI.
Returns
A string, which specifies the path to a local file on your local computer.
Example
The following
var filePath = siteRelativeToLocalPath("/myWebApp/myFile.xml");
returns
"C:\Inetpub\wwwroot\siteA\myFile.xml"
, based on your site mappings and the HTTP address specified
in the Local Info section of the Site Definition dialog box.
dreamweaver.compareFiles()
Availability
Dreamweaver 8.
Description
This function launches the file comparison tool that the user installed in the Diff section of the Preferences dialog box.
Arguments
file1, file2
•
The file1 attribute, which is required, is a string that contains the full path to the first file to compare.
•
The
file2
attribute, which is required, is a string that contains the full path to the second file to compare.