FilePathSeparator.cpp 742 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Co-Author: Claude Sonnet 4.6 (LLM)
  4. * Company: Lynar Studios
  5. * E-Mail: webmaster@lynarstudios.com
  6. * Created: 2023-02-04
  7. * Changed: 2026-06-23
  8. *
  9. * */
  10. #include <ls-std/io/FilePathSeparator.hpp>
  11. using ls::standard::io::FilePathSeparator;
  12. FilePathSeparator::FilePathSeparator() = default;
  13. FilePathSeparator::~FilePathSeparator() = default;
  14. #if defined(unix) || defined(__APPLE__)
  15. char FilePathSeparator::get()
  16. {
  17. return '/';
  18. }
  19. #endif
  20. #ifdef _WIN32
  21. char FilePathSeparator::get()
  22. {
  23. return '\\';
  24. }
  25. #endif
  26. char FilePathSeparator::getUnixFilePathSeparator()
  27. {
  28. return '/';
  29. }
  30. char FilePathSeparator::getWindowsFilePathSeparator()
  31. {
  32. return '\\';
  33. }