Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
path-references.hh
Go to the documentation of this file.
1#pragma once
3
5#include "nix/store/path.hh"
6#include "nix/util/source-accessor.hh"
7
8#include <functional>
9#include <vector>
10
11namespace nix {
12
13StorePathSet scanForReferences(Sink & toTee, const std::filesystem::path & path, const StorePathSet & refs);
14
15class PathRefScanSink : public RefScanSink
16{
17 std::map<std::string, StorePath> backMap;
18
19 PathRefScanSink(StringSet && hashes, std::map<std::string, StorePath> && backMap);
20
21 void anchor() override;
22
23public:
24
25 static PathRefScanSink fromPaths(const StorePathSet & refs);
26
27 StorePathSet getResultPaths();
28};
29
34{
36 StorePathSet foundRefs;
37};
38
61 SourceAccessor & accessor,
62 const CanonPath & rootPath,
63 const StorePathSet & refs,
64 fun<void(FileRefScanResult)> callback);
65
80std::map<CanonPath, StorePathSet>
81scanForReferencesDeep(SourceAccessor & accessor, const CanonPath & rootPath, const StorePathSet & refs);
82
83} // namespace nix
Definition canon-path.hh:50
Definition fun.hh:19
void scanForReferencesDeep(SourceAccessor &accessor, const CanonPath &rootPath, const StorePathSet &refs, fun< void(FileRefScanResult)> callback)
Definition path-references.cc:59
Definition path-references.hh:34
StorePathSet foundRefs
Which store paths were found in this file.
Definition path-references.hh:36
CanonPath filePath
The file that was scanned.
Definition path-references.hh:35
Definition serialise.hh:18
Definition source-accessor.hh:50
std::set< std::string, std::less<> > StringSet
Definition types.hh:45