TSInstallDirGet(3ts)

TSInstallDirGet3ts

Return traffic server installation directories

Usage

#include <ts/ts.h>
const char *TSInstallDirGet(void)
const char *TSConfigDirGet(void)
const char *TSPluginDirGet(void)
const char *TSRuntimeDirGet(void)

Overview

TSInstallDirGet() returns the path to the root of the Traffic Server installation. TSConfigDirGet(), TSPluginDirGet() and TSRuntimeDirGet() return the complete, absolute path to the configuration directory, the plugin installation directory and the runtime directory, respectively.

Return values

These functions all return a NUL-terminated string that must not be modified or freed.

Examples

To load a file that is located in the Traffic Server configuration directory:

#include <ts/ts.h>
#include <stdio.h>
char * path;
asprintf(&path, "%s/example.conf", TSConfigDirGet());

Releases

3 releases since Debian 10 (Buster); the text changed 2 times.

  1. 10
  2. 11
  3. 12

From trafficserver-dev 9.2.5+ds-0+deb12u4 in Debian 12 (Bookworm). Parsed by carta from the page's man source.