MCPcopy Create free account
hub / github.com/apache/impala / const_basename

Function const_basename

be/src/kudu/util/trace.cc:80–87  ·  view source on GitHub ↗

Get the part of filepath after the last path separator. (Doesn't modify filepath, contrary to basename() in libgen.h.) Borrowed from glog.

Source from the content-addressed store, hash-verified

78// (Doesn't modify filepath, contrary to basename() in libgen.h.)
79// Borrowed from glog.
80static const char* const_basename(const char* filepath) {
81 const char* base = strrchr(filepath, '/');
82#ifdef OS_WINDOWS // Look for either path separator in Windows
83 if (!base)
84 base = strrchr(filepath, '\\');
85#endif
86 return base ? (base+1) : filepath;
87}
88
89
90void Trace::SubstituteAndTrace(const char* file_path,

Callers 1

DumpMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected