• <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
      • Settings Namespace
      • Sqlite Namespace
      • System Namespace
        • System Action Invoker Namespace
        • System.getSharableUri Action
        • System.selectDocument Action
        • Sharable URI
      • 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>

System.getSharableUri Action

Format
s = CS.System.getSharableUri(path := ...ʃ, permissions := ...ʅ)
ArgumentDescriptionTypes / Required
pathThe path of file(s) from which to create sharable URI(s).string, array
required
permissionsPermissions to apply to the sharable URI(s).
The default value is "read".
string
not required
Description
The System.getSharableUri action creates a sharable URI that can be used by external applications to reference a file. The primary use for this action is to allow other Android applications to access data or files in the gov.census.cspro.csentry directory.
The path argument, enumerating the files, can be specified as:
  • A single string representing a file path.
  • A single string using wildcard characters "*" and "?" to specify a group of files.
  • An array of strings containing strings specified in one of the two above forms.
The permissions argument allows you to set the status of the file when used by other applications. The options include:
  • "read": The recipient of the sharable URI can only read the file (FLAG_GRANT_READ_URI_PERMISSION).
  • "readWrite": In addition to read permissions, the recipient can also write to the file (FLAG_GRANT_WRITE_URI_PERMISSION).
Return Value
The action returns the sharable URI, or array of sharable URIs. An array of strings containing the sharable URIs is returned unless path is a single string that does not contain wildcard characters, in which case a single string is returned.
Exceptions
The action throws an exception if any of its arguments are not specified in a valid form or if the file(s) specified in path do not exist.
Example (CSPro Logic)
SystemApp other_application;
other_application.
setArgument("data", CS.System.getSharableUri(path := "file-in-application-directory.jpg"));
other_application.
exec("com.example.other.application");
Example (JSON)
{
 
"action": "System.getSharableUri",
 
"path": "Data/*.csdb"
}
See also: System Action Invoker Namespace, System.selectDocument Action, Sharable URI