GetAppTempDirectory

Metreos.Native.ApplicationResources.GetAppTempDirectory

Summary

GetAppTempDirectory is used to retrieve the 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. The GetAppTempDirectory action allows a developer a way to programmatically determine both the physical file system location and the HTTP-rooted URI of the Temp folder, and any contents within that folder.

Remarks

Files written into the application Temp folder are not automatically deleted from the Temp folder unless the application is reinstalled. Best practice therefore dictates that any files written to the Temp directory are deleted appropriately by the application, so that the Temp directory does not eventually grow too large in size and affect the available hard disk for the entire server.

If you want files written to the temporary directory to be cleaned up as the script instance ends, use the GetScriptTempDirectory action to get a path to a folder that is deleted as the script ends.

Action Parameters
Parameter Name.NET TypeDefaultDescription
ApplicationNameSystem.StringThe name of the application to determine the 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 Temp directory. Either '/' or '\' can be used as the path seperator. If you specify this relative path, do not include the root 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.
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.