Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Method

GetKeyFiles

ModuleAgent
LibraryCore
Action


Excerpt
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.

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 from the default temporary directory %ALLUSERSPROFILE%\1E\Client\Temp if the specified setting is invalid, or there is no configuration setting

TemporaryDirectory is a configuration setting of the 1E Client available in v5.1 and in a hotfix for v5.0.


Example

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

Code Block
@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 "([^\\#])*=(.*)";
Multiexcerpt include
MultiExcerptNameECMA262
PageWithExcerptMethod Notes
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.

...