MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getFileDir

Function getFileDir

plugins/plugin_utils/plugin_files.cpp:318–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318std::string getFileDir(const char* file) {
319 std::string f = convertPathToDelims(file);
320
321 char* p = (char*)strrchr(f.c_str(), _DirDelim);
322 if (p)
323 // it's ok to go one past, cus even if it's the end, that's the
324 // NUL char so we can set it to NUL again with out worry
325 {
326 *(p + 1) = 0;
327 }
328
329 return std::string(f.c_str());
330}
331
332std::string getFileExtension(const char* file) {
333 std::string f = convertPathToDelims(file);

Callers

nothing calls this directly

Calls 2

convertPathToDelimsFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected