2015-04-09 10:12:50 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "types.hh"
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace nix {
|
|
|
|
|
|
|
|
struct DownloadResult
|
|
|
|
{
|
|
|
|
bool cached;
|
|
|
|
string data, etag;
|
|
|
|
};
|
|
|
|
|
|
|
|
DownloadResult downloadFile(string url, string expectedETag = "");
|
|
|
|
|
2015-05-05 15:09:42 +00:00
|
|
|
Path downloadFileCached(const string & url, bool unpack);
|
|
|
|
|
2015-04-09 10:49:13 +00:00
|
|
|
MakeError(DownloadError, Error)
|
|
|
|
|
2015-05-06 12:54:31 +00:00
|
|
|
bool isUri(const string & s);
|
|
|
|
|
2015-04-09 10:12:50 +00:00
|
|
|
}
|