GetScriptTempDirectory

Metreos.Native.ApplicationResources.GetScriptTempDirectory

Summary

GetScriptTempDirectory is used to retrieve a script instance's temp directory file path and URI.

Usage

A Temp folder is created under the application installation directory, and the directory and any files and directories within it are accessible via HTTP. Whenever a script instance is started, a directory is also created underneath the Temp directory with the name of that instance's RoutingGuid. The GetScriptTempDirectory action allows a developer a way to programmatically determine both the physical file system location and the HTTP-rooted URI of this script instance directory, and any contents within that directory.

Remarks

Files written into a script instance's temp folder are automatically deleted, along with the script instance folder itself, when the script instance ends.

Action Parameters
Parameter Name.NET TypeDefaultDescription
ApplicationNameSystem.StringThe name of the application to determine the script instance's temp directory for. If not specified, the name of the current application is used.
SubpathSystem.StringA path to a folder or file contained within the script instance's temp directory. Either '/' or '\' can be used as the path seperator. If you specify this relative path, do not include the root script instance temp directory, and the inclusion of a leading seperator is optional. If this field is not specified, then the filepath and URI to the Web directory is returned.
RoutingGuid *System.StringThe RoutingGuid of the the script instance.
Result Data
Parameter Name.NET TypeDescription
FilepathSystem.StringThe full filepath to the Temp directory for the application. The subpath will be appended to the Temp directory path if specified.
UriSystem.StringThe HTTP-rooted URI to the Temp directory for the application. The subpath will be appended to the Temp directory path if specified.

Branch Conditions 

Success

No description.

Failure

No description.