Build tool
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.

sys.h 538B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <string>
  3. #include <vector>
  4. namespace sys {
  5. struct FileInfo {
  6. long mTimeSec;
  7. long mTimeNsec;
  8. bool isDir;
  9. };
  10. FileInfo fileInfo(const std::string &path);
  11. bool fileExists(const std::string &path);
  12. void mkdirp(const std::string &path);
  13. void execute(const std::vector<std::string> &args, std::string *output, bool print);
  14. void readDir(const std::string &path, std::vector<std::string> &files);
  15. void chdir(const std::string &path);
  16. std::string cwd();
  17. void symlink(const std::string &from, const std::string &to);
  18. }