#pragma once #include "types.hh" #include namespace nix { struct DownloadOptions { string expectedETag; bool verifyTLS{true}; bool forceProgress{false}; }; struct DownloadResult { bool cached; string data, etag; }; class StoreAPI; DownloadResult downloadFile(string url, const DownloadOptions & options); Path downloadFileCached(ref store, const string & url, bool unpack); MakeError(DownloadError, Error) bool isUri(const string & s); }