Util.hpp 683 B

1234567891011121314151617181920212223242526
  1. #ifndef TEMPLATE_UTIL_HPP
  2. #define TEMPLATE_UTIL_HPP
  3. #include <sys/stat.h>
  4. #include <string>
  5. #include <cpp3ds/Network/Http.hpp>
  6. #include <cpp3ds/System/String.hpp>
  7. #ifndef EMULATION
  8. #include <3ds.h>
  9. #endif
  10. namespace Template
  11. {
  12. bool pathExists(const char* path, bool escape = true);
  13. bool fileExists (const std::string& name);
  14. void makeDirectory(const char *dir, mode_t mode = 0777);
  15. int removeDirectory(const char *path, bool onlyIfEmpty = false);
  16. void hexToRGB(std::string hexValue, int *R, int *G, int *B);
  17. std::string ReplaceAll(std::string str, const std::string& from, const std::string& to);
  18. cpp3ds::String getUsername();
  19. } // namespace Template
  20. #endif // TEMPLATE_UTIL_HPP