diff options
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r-- | src/libstore/store-api.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index f133302b2f84..e44259ddaf09 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -174,11 +174,21 @@ bool isStorePath(const Path & path); void checkStoreName(const string & name); + /* Chop off the parts after the top-level store name, e.g., /nix/store/abcd-foo/bar => /nix/store/abcd-foo. */ Path toStorePath(const Path & path); +/* Follow symlinks until we end up with a path in the Nix store. */ +Path followLinksToStore(const Path & path); + + +/* Same as followLinksToStore(), but apply toStorePath() to the + result. */ +Path followLinksToStorePath(const Path & path); + + /* Constructs a unique store path name. */ Path makeStorePath(const string & type, const Hash & hash, const string & suffix); |