MCPcopy Create free account
hub / github.com/catboost/catboost / GetFileNameComponent

Function GetFileNameComponent

util/folder/dirut.cpp:533–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533const char* GetFileNameComponent(const char* f) {
534 const char* p = strrchr(f, LOCSLASH_C);
535#ifdef _win_
536 // "/" is also valid char separator on Windows
537 const char* p2 = strrchr(f, '/');
538 if (p2 > p) {
539 p = p2;
540 }
541#endif
542
543 if (p) {
544 return p + 1;
545 }
546
547 return f;
548}
549
550TString GetSystemTempDir() {
551#ifdef _win_

Callers 1

RealLocationFunction · 0.70

Calls 1

strrchrFunction · 0.50

Tested by

no test coverage detected