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