• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
      • Overview
      • Execution Environments
      • Security and Formatting Options
      • Base Actions
      • Application Namespace
      • Clipboard Namespace
      • Data Namespace
      • Dictionary Namespace
      • File Namespace
      • Hash Namespace
      • Localhost Namespace
      • Logic Namespace
      • Message Namespace
      • Path Namespace
        • Path Action Invoker Namespace
        • Path.createDirectory Action
        • Path.getDirectoryListing Action
        • Path.getPathInfo Action
        • Path.getSpecialPaths Action
        • Path.selectFile Action
        • Path.showFileDialog Action
      • Settings Namespace
      • Sqlite Namespace
      • System Namespace
      • UI Namespace
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Path.getSpecialPaths Action

Format
s = CS.Path.getSpecialPaths()
Description
The Path.getSpecialPaths action returns special paths, including the download and temp directories. The paths returned include:
PathDescription
"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.
Return Value
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.
Exceptions
The action does not throw exceptions.
Example (JavaScript)
// 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
}
See also: Path Action Invoker Namespace, PathName Function