Paul R. BoonAn Infinite Number of Monkeys

...So why doesn't that script work?

Undocumented Dreamweaver: Locating the systems temp folder

Posted Saturday, August 28, 2004 7:16:36 AM by Paul R. Boon

The documented API call dreamweaver.getTempFolderPath() returns a File URL to a temporary folder within Dreamweaver's configuration folder where you can store temporary or transient files. These are usually files that you may need during a session of Dreamweaver but are not needed across sessions.

I commonly use this location when one of my extensions needs to write out temporary data collected from other locations or when performing complex file system operations, as it is safe known place to move files during the current DW session.

Note: When using this folder you should treat it like the shared folder, by first creating your own child folder.

However you may require access to the operating systems own temp folder and luckily there is yet again an undocumented API call the comes to the aid of us extension developers.

getSystemTempFolder() This undocumented call is exposed by the DWfile File I/O Object and so to reference it we use DWfile.getSystemTempFolder();

Example of use:

var systemTempFolder = DWfile.getSystemTempFolder();

Note: This call returns an operating system file path and not a file URL like other path related API calls.

Category tags: Dreamweaver, Extensibility

See Community MX content by Paul R. Boon