MCPcopy Create free account
hub / github.com/baidu/tera / GetFileNameFromPath

Function GetFileNameFromPath

src/common/log/log_cleaner.cc:39–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39static std::string GetFileNameFromPath(const std::string& path) {
40 std::string::size_type pos = path.rfind("/");
41 if (pos == std::string::npos) {
42 return path;
43 } else {
44 return path.substr(pos + 1);
45 }
46}
47
48LogCleaner* LogCleaner::GetInstance(ThreadPool* thread_pool) {
49 if (singleton_instance_ == NULL) {

Callers 3

GetInstanceMethod · 0.85
DoCleanLocalLogsMethod · 0.85
GetCurrentOpendLogsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected