pathinfo.h 978 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef IGL_PATHINFO_H
  2. #define IGL_PATHINFO_H
  3. #include "igl_inline.h"
  4. #include <string>
  5. namespace igl
  6. {
  7. //// Decided not to use these
  8. //const int PATHINFO_DIRNAME 01
  9. //const int PATHINFO_BASENAME 02
  10. //const int PATHINFO_EXTENSION 04
  11. //const int PATHINFO_FILENAME 08
  12. // Function like PHP's pathinfo
  13. // returns information about path
  14. // Input:
  15. // path string containing input path
  16. // Outputs:
  17. // dirname string containing dirname (see dirname.h)
  18. // basename string containing basename (see basename.h)
  19. // extension string containing extension (characters after last '.')
  20. // filename string containing extension (characters of basename before last
  21. // '.')
  22. //
  23. // See also: basename, dirname
  24. IGL_INLINE void pathinfo(
  25. const std::string & path,
  26. std::string & dirname,
  27. std::string & basename,
  28. std::string & extension,
  29. std::string & filename);
  30. }
  31. #ifdef IGL_HEADER_ONLY
  32. # include "pathinfo.cpp"
  33. #endif
  34. #endif