diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-12-01T20·51+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-12-01T20·51+0000 |
commit | a824d58b566752b2a89a718fd628053754968d72 (patch) | |
tree | ff624d24dbbc61e199d699aa32e7bcf54773de39 /src/libstore/store-api.hh | |
parent | ceb982a1be381d59532d0405451f38d263abb617 (diff) |
* Merge addToStore and addToStoreFixed.
* addToStore now adds unconditionally, it doesn't use readOnlyMode. Read-only operation is up to the caller (who can call computeStorePathForPath).
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r-- | src/libstore/store-api.hh | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index cbf2f7ef295f..6fbe979316f2 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -63,14 +63,11 @@ public: PathSet & referrers) = 0; /* Copy the contents of a path to the store and register the - validity the resulting path. The resulting path is - returned. */ - virtual Path addToStore(const Path & srcPath) = 0; - - /* Like addToStore(), but for pre-adding the outputs of - fixed-output derivations. */ - virtual Path addToStoreFixed(bool recursive, string hashAlgo, - const Path & srcPath) = 0; + validity the resulting path. The resulting path is returned. + If `fixed' is true, then the output of a fixed-output + derivation is pre-loaded into the Nix store. */ + virtual Path addToStore(const Path & srcPath, bool fixed = false, + bool recursive = false, string hashAlgo = "") = 0; /* Like addToStore, but the contents written to the output path is a regular file containing the given string. */ @@ -119,8 +116,8 @@ Path makeFixedOutputPath(bool recursive, it computes the store path to which srcPath is to be copied. Returns the store path and the cryptographic hash of the contents of srcPath. */ -std::pair<Path, Hash> computeStorePathForPath(bool fixed, bool recursive, - string hashAlgo, const Path & srcPath); +std::pair<Path, Hash> computeStorePathForPath(const Path & srcPath, + bool fixed = false, bool recursive = false, string hashAlgo = ""); /* Preparatory part of addTextToStore(). |