The
Path.getSpecialPaths action returns special paths, including the download and temp directories. The paths returned include:
Path | Description |
"application" | The directory where the application file is located (if applicable). |
"CSEntry" | The directory from which CSPro applications are run. (Android only.) |
"CSPro" | The directory where the CSPro executable files are located. |
"downloads" | The operating system's directory for storing downloaded files. |
"html" | The directory where CSPro's HTML files are located. |
"temp" | The operating system's temporary directory. |
Directory paths are returned without a trailing slash.
Special paths can also be queried using the
pathname function.
The action returns an object containing the special paths, with the object's property names corresponding to the special path types, and the values corresponding to fully evaluated paths.
The action does not throw exceptions.
// select an image file from the images included in CSPro's html directory
const imagePath = CS.Path.selectFile({
title: "Select an Image",
filter: "|FileType.Image",
rootDirectory: CS.Path.getSpecialPaths().html + "/images"
});
if( imagePath !== undefined ) {
// ... do something with the selected image
}