about summary refs log blame commit diff
path: root/src/libstore/download.hh
blob: 28c9117e4227395129d3fec176ed21daca3af8b7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                  

                                                         

                               

                             
 
#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)

bool isUri(const string & s);

}