about summary refs log tree commit diff
path: root/src/libexpr/download.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/download.hh')
-rw-r--r--src/libexpr/download.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libexpr/download.hh b/src/libexpr/download.hh
new file mode 100644
index 000000000000..aa4fd5083d4e
--- /dev/null
+++ b/src/libexpr/download.hh
@@ -0,0 +1,16 @@
+#pragma once
+
+#include "types.hh"
+#include <string>
+
+namespace nix {
+
+struct DownloadResult
+{
+    bool cached;
+    string data, etag;
+};
+
+DownloadResult downloadFile(string url, string expectedETag = "");
+
+}