MCPcopy Create free account
hub / github.com/apache/trafficserver / StaticHitConfig

Method StaticHitConfig

plugins/statichit/statichit.cc:66–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64
65struct StaticHitConfig {
66 explicit StaticHitConfig(const std::string &fileOrDir, const std::string &mimeType, bool exact) : mimeType(mimeType)
67 {
68 std::filesystem::path base_path{fileOrDir};
69
70 if (!base_path.is_absolute()) {
71 base_path = std::filesystem::path(TSConfigDirGet()) / base_path;
72 }
73 base_path = std::filesystem::weakly_canonical(base_path);
74
75 if (std::filesystem::is_directory(base_path)) {
76 dirPath = std::move(base_path);
77 filePath = "";
78 disableExact = true;
79 } else {
80 dirPath = "";
81 filePath = std::move(base_path);
82 disableExact = exact;
83 }
84 }
85
86 ~StaticHitConfig() { TSContDestroy(cont); }
87

Callers

nothing calls this directly

Calls 4

pathClass · 0.85
TSConfigDirGetFunction · 0.85
is_directoryFunction · 0.85
is_absoluteMethod · 0.80

Tested by

no test coverage detected