about summary refs log tree commit diff
path: root/src/libstore/local-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r--src/libstore/local-store.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index cace5cb60b36..dcb430a0fcfd 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -696,6 +696,24 @@ Path LocalStore::addTextToStore(const string & suffix, const string & s,
 }
 
 
+void LocalStore::exportPath(const Path & path, bool sign,
+    Sink & sink)
+{
+    assertStorePath(path);
+    
+    dumpPath(path, sink);
+
+    writeString(path, sink);
+    
+    PathSet references;
+    queryReferences(path, references);
+    writeStringSet(references, sink);
+
+    Path deriver = queryDeriver(noTxn, path);
+    writeString(deriver, sink);
+}
+
+
 void deleteFromStore(const Path & _path, unsigned long long & bytesFreed)
 {
     bytesFreed = 0;