add utils::path_dirname() to complement utils::path_basename()

This commit is contained in:
Axel Kohlmeyer
2020-10-23 20:12:03 -04:00
parent c51d2a286a
commit b931501711
3 changed files with 38 additions and 0 deletions

View File

@ -291,6 +291,13 @@ namespace LAMMPS_NS {
std::string path_basename(const std::string &path);
/** Return the directory part of a path. Return "." if empty
*
* \param path file path
* \return directory name */
std::string path_dirname(const std::string &path);
/** Join two pathname segments
*
* This uses the forward slash '/' character unless LAMMPS is compiled