#include #include "archives.hpp" #include "archive_preflight.hpp" #include #include #include #include // ARCHIVE_TRACE=1 prints the extraction steps, the throughput breakdown among them. void archives::trace(const char* step,const char* detail){if(std::getenv("ARCHIVE_TRACE"))std::cerr<d_name,user);closedir(d);return true;} int main(int argc,char** argv){ if(argc>2&&std::string(argv[1])=="inspect"){ int first=2; if(argc>4&&std::string(argv[2])=="--budget"){archives::inspect_budget=std::chrono::milliseconds(std::stol(argv[3]));first=4;} const auto inspection=archives::inspect(std::vector(argv+first,argv+argc)); std::cout< cancels it then; --again // runs the same request once more in this process with that rar-extract. long cancel_after=-1;const char* again=nullptr; for(int i=3;i=0&&std::chrono::steady_clock::now()-started>=std::chrono::milliseconds(cancel_after)){archives::cancel(id);cancel_after=-1;} std::this_thread::sleep_for(std::chrono::milliseconds(10));} }