about summary refs log tree commit diff
path: root/src/store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-10-08T15·06+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-10-08T15·06+0000
commit6baa2c442035fb06652a7fad9d51df1ce41c05f9 (patch)
treec77e57b30ea01fd7ae76ca04a7d8bbc13a1a3979 /src/store.hh
parentb9f4942bd2f8aae44db6caa5a4ebe5680880fec2 (diff)
* Get rid of identifiers since they are redundant now. This greatly
  simplifies stuff.

* The format of Nix expressions and the database schema changed
  because of this, so it's best to delete old Nix installations.

Diffstat (limited to 'src/store.hh')
-rw-r--r--src/store.hh41
1 files changed, 12 insertions, 29 deletions
diff --git a/src/store.hh b/src/store.hh
index 7f6b24569038..69de8247860f 100644
--- a/src/store.hh
+++ b/src/store.hh
@@ -9,44 +9,27 @@
 using namespace std;
 
 
-typedef Hash FSId;
-
-typedef set<FSId> FSIdSet;
-
-
 /* Copy a path recursively. */
-void copyPath(string src, string dst);
+void copyPath(const Path & src, const Path & dst);
 
 /* Register a substitute. */
-void registerSubstitute(const FSId & srcId, const FSId & subId);
-
-/* Register a path keyed on its id. */
-void registerPath(const Transaction & txn,
-    const string & path, const FSId & id);
+void registerSubstitute(const Path & srcPath, const Path & subPath);
 
-/* Query the id of a path. */
-bool queryPathId(const string & path, FSId & id);
+/* Register the validity of a path. */
+void registerValidPath(const Transaction & txn, const Path & path);
 
-/* Return a path whose contents have the given hash.  If target is
-   not empty, ensure that such a path is realised in target (if
-   necessary by copying from another location).  If prefix is not
-   empty, only return a path that is an descendent of prefix.
+/* Unregister the validity of a path. */
+void unregisterValidPath(const Path & path);
 
-   The list of pending ids are those that already being expanded.
-   This prevents infinite recursion for ids realised through a
-   substitute (since when we build the substitute, we would first try
-   to expand the id... kaboom!). */
-string expandId(const FSId & id, const string & target = "",
-    const string & prefix = "/", FSIdSet pending = FSIdSet(),
-    bool ignoreSubstitutes = false);
+/* Checks whether a path is valid. */ 
+bool isValidPath(const Path & path);
 
-/* Copy a file to the nixStore directory and register it in dbRefs.
-   Return the hash code of the value. */
-void addToStore(string srcPath, string & dstPath, FSId & id,
-    bool deterministicName = false);
+/* Copy the contents of a path to the store and register the validity
+   the resulting path.  The resulting path is returned. */
+Path addToStore(const Path & srcPath);
 
 /* Delete a value from the nixStore directory. */
-void deleteFromStore(const string & path);
+void deleteFromStore(const Path & path);
 
 void verifyStore();