You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
765B

  1. #pragma once
  2. #include "common.hpp"
  3. #include <list>
  4. namespace rack {
  5. namespace system {
  6. std::list<std::string> listEntries(const std::string &path);
  7. bool isFile(const std::string &path);
  8. bool isDirectory(const std::string &path);
  9. void copyFile(const std::string &srcPath, const std::string &destPath);
  10. void createDirectory(const std::string &path);
  11. /** Currently this lies and returns the number of logical cores instead. */
  12. int getPhysicalCoreCount();
  13. void setThreadName(const std::string &name);
  14. /** Opens a URL, also happens to work with PDFs and folders.
  15. Shell injection is possible, so make sure the URL is trusted or hard coded.
  16. May block, so open in a new thread.
  17. */
  18. void openBrowser(const std::string &url);
  19. } // namespace system
  20. } // namespace rack