mirror of
https://github.com/NixOS/nix.git
synced 2025-12-02 15:11:00 +01:00
Remove fetchers::Tree and move tarball-related stuff into its own header
This commit is contained in:
parent
091e5b4513
commit
935c9981de
16 changed files with 111 additions and 103 deletions
43
src/libfetchers/tarball.hh
Normal file
43
src/libfetchers/tarball.hh
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#pragma once
|
||||
|
||||
#include "types.hh"
|
||||
#include "path.hh"
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace nix {
|
||||
class Store;
|
||||
}
|
||||
|
||||
namespace nix::fetchers {
|
||||
|
||||
struct DownloadFileResult
|
||||
{
|
||||
StorePath storePath;
|
||||
std::string etag;
|
||||
std::string effectiveUrl;
|
||||
std::optional<std::string> immutableUrl;
|
||||
};
|
||||
|
||||
DownloadFileResult downloadFile(
|
||||
ref<Store> store,
|
||||
const std::string & url,
|
||||
const std::string & name,
|
||||
bool locked,
|
||||
const Headers & headers = {});
|
||||
|
||||
struct DownloadTarballResult
|
||||
{
|
||||
StorePath storePath;
|
||||
time_t lastModified;
|
||||
std::optional<std::string> immutableUrl;
|
||||
};
|
||||
|
||||
DownloadTarballResult 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