Skip to main content

1E 8.1 (on-premises)

Agent.GetKeyFiles

Method

GetKeyFiles

Module

Agent

Library

Core

Action

Returns names and paths of key files relating to the execution of the Tachyon Agent.

Parameters

(None)

Return values

Configuration (string): The full path of the file used to configure the Tachyon Agent.

Executable (string): The full path of the executable file corresponding to the running Tachyon Agent.

Log (string): The full path of the Tachyon Agent log file.

DataRootDirectory (string): The directory used by the 1E Client for general data storage. Available since v8.1.

TemporaryDirectory (string): The directory actually used by the 1E Client for temporary files and directories.

Note

This is derived from either the configuration value if the specified setting is valid, or the default temporary directory.

The following table shows the OS-specific defaults used if the setting is omitted, blank, or invalid. The default is recommended.

Platform

Environment Variable(s)

Default

Windows

TMP

TEMP

%windir%\Temp which is the default %TEMP% location for SYSTEM.

Linux

TMPDIR

/tmp

TemporaryDirectory is a configuration setting of the 1E Client.

Example

The following example reads the Tachyon Agent configuration file and shows the contained settings and values:

@keyFiles = Agent.GetKeyFiles();

/* Bail if the Agent has no configuration file (see Notes below) */
SELECT * FROM @keyFiles WHERE Configuration != "";
EVALUATE;

/* Read each line of configuration file */
@lines = FileSystem.GetFileByLine(FileName: @keyFiles.Configuration);

/* Filter out comment entries, and parse remaining lines into Setting and Value */
SELECT LTRIM(REGEXPREPLACE("([^=]*)=(.*)", Content, "$1")) AS Setting
,      LTRIM(REGEXPREPLACE("([^=]*)=(.*)", Content, "$2")) AS Value
FROM   @lines
WHERE  LTRIM(Content) REGEXP "([^\\#])*=(.*)";

Platforms

  • Windows

  • Linux

  • MacOS

  • Solaris Intel

  • Solaris Sparc

  • Android

Notes

Although this method is supported on Android devices, only the Executable and TemporaryDirectory fields will have a value. The Configuration and Log fields will be empty. This is because Tachyon Agents running on Android devices are configured via the Application Preferences interface (not based on a configuration file), and log directly to the Android sub-system.