TSInstallDirGet¶
Return Traffic Server installation directories.
Synopsis¶
#include <ts/ts.h>
- const char * TSInstallDirGet(void) InkAPI.cc line 1716¶
- const char * TSConfigDirGet(void) InkAPI.cc line 1722¶
- const char * TSPluginDirGet(void) InkAPI.cc line 1738¶
Description¶
TSInstallDirGet() returns the path to the root of the Traffic Server installation. TSConfigDirGet() and TSPluginDirGet() return the complete, absolute path to the configuration directory and the plugin installation 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());
See also¶
TSAPI(3ts)