diff options
Diffstat (limited to 'src/libstore/download.hh')
-rw-r--r-- | src/libstore/download.hh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/libstore/download.hh b/src/libstore/download.hh new file mode 100644 index 000000000000..28c9117e4227 --- /dev/null +++ b/src/libstore/download.hh @@ -0,0 +1,22 @@ +#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); + +} |