FilePathSeparator.cpp 693 B

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