HotDocs.Server.UtilityTools Class

The UtilityTools class contains static methods for converting files, managing temporary files, and other general utilities.

Namespace: HotDocs.Server
Assembly: HotDocs.Server in HotDocs.Server.dll

Methods

Method Description
AddLogEntry This method adds an entry to the HotDocs Server log file. Although this method is frequently used for error messages, you could use it to record any kind of information in the HotDocs Server log file. For example, you could add a log entry when a user first logs on to your host application.
BuildServerFiles This method creates the files required by HotDocs Server to display an interview for a template.

This method is no longer supported; its functionality has been replaced by Application.BuildSupportFiles.

CheckFileAccess Determine the ability of the HotDocs Server process to access a file.
ConvertFile This method converts a document from one file type to another. For example, you can use it to convert an .RTF or .DOCX file to .HTML or .PDF.
ConvertRtfFile This method converts an RTF document to a PDF, HTML, or TXT document.

This method is deprecated in HotDocs Server 11. Enhanced functionality is available using UtilityTools.ConvertFile.

CreateTempDirectory This method creates a folder on disk using a unique ID where you can save temporary files.
DecryptString This method decrypts a string.
DeleteTempDirectory This method deletes the files in a temporary folder identified by a unique ID.
EncryptString This method encrypts a string.
GetTempDirectoryPath This method returns the path to a temporary folder identified by a unique ID.
GetTempFilePath This method generates a random file name using the specified extension, and returns the full path to that file in the folder indicated.
TouchTempDirectory This method sets the modification time of each file in the specified directory to the current time. This is useful to keep temporary files from being deleted by a process that looks for temporary files older than a specific age.

Enumerations

Enumeration Description
FileMode This enumeration is used with UtilityTools.CheckFileAccess method to determine which file access attributes to check on a file.