MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / DownloadToPath

Function DownloadToPath

Source/Tools/FEXRootFSFetcher/Main.cpp:515–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513}
514
515bool DownloadToPath(const fextl::string& URL, const fextl::string& Path) {
516 auto filename = URL.substr(URL.find_last_of('/') + 1);
517 auto PathName = Path + filename;
518
519 std::array<const char*, 5> ExecveArgs = {
520 "curl", URL.c_str(), "-o", PathName.c_str(), nullptr,
521 };
522
523 return Exec::ExecAndWaitForResponse(ExecveArgs[0], const_cast<char* const*>(ExecveArgs.data())) == 0;
524}
525
526bool DownloadToPathWithZenityProgress(const fextl::string& URL, const fextl::string& Path) {
527 auto filename = URL.substr(URL.find_last_of('/') + 1);

Callers 1

Calls 1

ExecAndWaitForResponseFunction · 0.85

Tested by

no test coverage detected