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

Function update_file_name

tests/tools/plugins/ssl_secret_load_test.cc:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49std::unordered_map<std::string, time_t> secret_versions;
50
51void
52update_file_name(const std::string_view &path, std::string &newname)
53{
54 // insert the "ssl" directory into the path
55 auto offset = path.find_last_of("/");
56 if (offset == std::string::npos) {
57 newname = "ssl/";
58 newname.append(path);
59 } else {
60 newname = path.substr(0, offset + 1);
61 newname.append("ssl/");
62 newname.append(path.substr(offset + 1));
63 }
64}
65
66bool
67load_file(const std::string &newname, struct stat *statdata, std::string &data_item)

Callers 2

CB_Load_SecretFunction · 0.85
CB_Update_SecretFunction · 0.85

Calls 2

appendMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected