TSInstallDirGet
Return Traffic Server installation directories.
概要
#include <ts/ts.h>
-
const char *TSInstallDirGet(void)
-
const char *TSConfigDirGet(void)
-
const char *TSPluginDirGet(void)
-
const char *TSRuntimeDirGet(void)
解説
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
これらの関数はすべて変更や解放をしてはならない NULL 終端文字列を返します。
例
Traffic Server 設定ディレクトリにあるファイルを読み込むためには:
#include <ts/ts.h>
#include <stdio.h>
char * path;
asprintf(&path, "%s/example.conf", TSConfigDirGet());
See Also
TSAPI(3ts)