Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
remote-fs-accessor.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "nix/util/source-accessor.hh"
5
#include "
nix/util/ref.hh
"
6
#include "nix/util/nar-cache.hh"
7
#include "
nix/store/store-api.hh
"
8
9
namespace
nix {
10
11
class
RemoteFSAccessor :
public
SourceAccessor
12
{
13
void
anchor()
override
;
14
15
ref<Store>
store;
16
22
std::map<std::string, Hash, std::less<>> narHashes;
23
24
NarCache
narCache;
25
26
bool
requireValidPath;
27
28
std::pair<ref<SourceAccessor>,
CanonPath
> fetch(
const
CanonPath
& path);
29
30
friend
struct
BinaryCacheStore;
31
32
public
:
33
39
std::shared_ptr<SourceAccessor>
accessObject
(
const
StorePath
& path);
40
41
RemoteFSAccessor(
ref<Store>
store,
bool
requireValidPath =
true
, std::optional<AbsolutePath> cacheDir = {});
42
43
std::optional<Stat> maybeLstat(
const
CanonPath
& path)
override
;
44
45
DirEntries
readDirectory
(
const
CanonPath
& path)
override
;
46
47
void
readFile
(
const
CanonPath
& path,
Sink
& sink,
fun
<
void
(uint64_t)> sizeCallback)
override
;
48
49
using
SourceAccessor::readFile
;
50
51
std::string readLink(
const
CanonPath
& path)
override
;
52
};
53
54
}
// namespace nix
nix::CanonPath
Definition
canon-path.hh:50
nix::NarCache
Definition
nar-cache.hh:20
nix::RemoteFSAccessor::accessObject
std::shared_ptr< SourceAccessor > accessObject(const StorePath &path)
Definition
remote-fs-accessor.cc:22
nix::RemoteFSAccessor::readFile
void readFile(const CanonPath &path, Sink &sink, fun< void(uint64_t)> sizeCallback) override
Definition
remote-fs-accessor.cc:54
nix::RemoteFSAccessor::readDirectory
DirEntries readDirectory(const CanonPath &path) override
Definition
remote-fs-accessor.cc:48
nix::StorePath
Definition
path.hh:33
nix::fun
Definition
fun.hh:19
nix::ref
Definition
ref.hh:58
ref.hh
store-api.hh
nix::Sink
Definition
serialise.hh:18
nix::SourceAccessor::readFile
std::string readFile(const CanonPath &path)
Definition
source-accessor.cc:62
libstore
include
nix
store
remote-fs-accessor.hh
Generated by
1.18.0