Dwuri.getextension(), Dwuri.getlastpathcomponent(), Dwuri.removelastpathcomponent() – Adobe Dreamweaver API Reference CS5 User Manual

Page 293

Advertising
background image

288

DREAMWEAVER API REFERENCE

Document

Last updated 8/27/2013

Returns
A string that specifies the filename.

DWUri.getExtension()

Availability
Dreamweaver CS5.

Description
Retrieves the extension from the URI object.

Arguments
stripDot

A Boolean:

true

to remove the leading dot from the result. Specify false to return the leading dot. The default behavior

is to return with the leading dot. This argument is optional.

Returns
A string that specifies the extension.

DWUri.getLastPathComponent()

Availability
Dreamweaver CS5.

Description
Retrieves the last part of the path component of the filename.

Arguments
None.

Returns
A string that specifies the last path part.

For the URI “

http://www.adobe.com/Dreamweaver/CS5/index.htm

”,

getLastPathComponent()

will return

CS5

”.

DWUri.removeLastPathComponent()

Availability
Dreamweaver CS5.

Description
Removes the last part of the path component of the filename.

For the URI “

http://www.adobe.com/Dreamweaver/CS5/index.htm

”,

removeLastPathComponent()

will return

CS5

” and will remove that string from the URI.

Advertising