blob: 7aec8de73e48f25d9a0599e0a774bda757689d65 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#pragma once
#include "types.hh"
#include <string>
namespace nix {
struct DownloadOptions
{
string expectedETag;
bool verifyTLS{true};
bool forceProgress{false};
};
struct DownloadResult
{
bool cached;
string data, etag;
};
class Store;
DownloadResult downloadFile(string url, const DownloadOptions & options);
Path downloadFileCached(ref<Store> store, const string & url, bool unpack);
MakeError(DownloadError, Error)
bool isUri(const string & s);
}
|