#pragma once #include "types.hh" #include "path.hh" #include namespace nix { class Store; } namespace nix::fetchers { struct DownloadFileResult { StorePath storePath; std::string etag; std::string effectiveUrl; std::optional immutableUrl; }; DownloadFileResult downloadFile( ref store, const std::string & url, const std::string & name, bool locked, const Headers & headers = {}); struct DownloadTarballResult { StorePath storePath; time_t lastModified; std::optional immutableUrl; }; DownloadTarballResult downloadTarball( ref store, const std::string & url, const std::string & name, bool locked, const Headers & headers = {}); }