TF++, Miscellaneous classes and modules in C++:

◆ dirname()

std::string tfxx::fs::dirname ( const std::string &  path)

return path with its last non-slash component removed

C++ interface to dirname(3)

Definition at line 45 of file dirname.cc.

Referenced by tfxx::file::creatable(), main(), and mkdirp().

46  {
47  unsigned int n=path.length()+2;
48  char* p=new char[n];
49  std::strncpy(p, path.c_str(), n);
50  std::string retval(::dirname(p));
51  delete[] p;
52  return retval;
53  }
std::string dirname(const std::string &path)
return path with its last non-slash component removed
Definition: dirname.cc:45
Here is the caller graph for this function: