mirror of
https://github.com/NixOS/nix.git
synced 2025-12-24 09:50:55 +01:00
Move download stuff into tarball.hh
This commit is contained in:
parent
48012603b3
commit
71b155b9e6
10 changed files with 38 additions and 25 deletions
|
|
@ -2,14 +2,13 @@
|
|||
|
||||
#include "types.hh"
|
||||
#include "hash.hh"
|
||||
#include "path.hh"
|
||||
#include "canon-path.hh"
|
||||
#include "attrs.hh"
|
||||
#include "url.hh"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace nix { class Store; class InputAccessor; }
|
||||
namespace nix { class Store; class StorePath; class InputAccessor; }
|
||||
|
||||
namespace nix::fetchers {
|
||||
|
||||
|
|
@ -148,25 +147,4 @@ struct InputScheme
|
|||
|
||||
void registerInputScheme(std::shared_ptr<InputScheme> && fetcher);
|
||||
|
||||
struct DownloadFileResult
|
||||
{
|
||||
StorePath storePath;
|
||||
std::string etag;
|
||||
std::string effectiveUrl;
|
||||
};
|
||||
|
||||
DownloadFileResult downloadFile(
|
||||
ref<Store> store,
|
||||
const std::string & url,
|
||||
const std::string & name,
|
||||
bool locked,
|
||||
const Headers & headers = {});
|
||||
|
||||
std::pair<StorePath, time_t> downloadTarball(
|
||||
ref<Store> store,
|
||||
const std::string & url,
|
||||
const std::string & name,
|
||||
bool locked,
|
||||
const Headers & headers = {});
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue