TSINSTALLDIRGET(3ts) | Apache Traffic Server | TSINSTALLDIRGET(3ts) |
TSInstallDirGet - return Traffic Server installation directories
#include <ts/ts.h>
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.
These functions all return a NUL-terminated string that must not be modified or freed.
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());
2023, dev@trafficserver.apache.org
November 2, 2023 | 9.2 |