about summary refs log tree commit diff
path: root/src/libexpr/download.hh
blob: 36fa183d68f92a9d69661d833e95ab6d0ee264de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include "types.hh"
#include <string>

namespace nix {

struct DownloadResult
{
    bool cached;
    string data, etag;
};

DownloadResult downloadFile(string url, string expectedETag = "");

Path downloadFileCached(const string & url, bool unpack);

MakeError(DownloadError, Error)

}