Skip to main content

1E 23.7 (SaaS)

Agent.GetKeyFiles

Module

Agent

Method

GetKeyFiles

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.

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

Notes