Util.hpp 770 B

12345678910111213141516171819202122232425262728
  1. #ifndef FREESHOP_UTIL_HPP
  2. #define FREESHOP_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 FreeShop
  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. std::string getCountryCode(int region);
  17. uint32_t getTicketVersion(cpp3ds::Uint64 tid);
  18. void hexToRGB(std::string hexValue, int *R, int *G, int *B);
  19. std::string ReplaceAll(std::string str, const std::string& from, const std::string& to);
  20. cpp3ds::String getUsername();
  21. } // namespace FreeShop
  22. #endif // FREESHOP_UTIL_HPP