Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
file-content-address.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "nix/util/source-accessor.hh"
5
6
namespace
nix {
7
8
struct
SourcePath
;
9
20
enum struct
FileSerialisationMethod
: uint8_t {
27
Flat
,
28
36
NixArchive
,
37
};
38
47
FileSerialisationMethod parseFileSerialisationMethod(std::string_view input);
48
54
std::string_view renderFileSerialisationMethod(FileSerialisationMethod method);
55
59
void
dumpPath(
60
const
SourcePath & path, Sink & sink, FileSerialisationMethod method, PathFilter & filter = defaultPathFilter);
61
62
class
RestoreSinkHooks;
63
69
void
restorePath(
70
const
std::filesystem::path & path,
71
Source & source,
72
FileSerialisationMethod method,
73
bool
startFsync =
false
,
74
RestoreSinkHooks * hooks =
nullptr
);
75
86
HashResult hashPath(
87
const
SourcePath & path, FileSerialisationMethod method, HashAlgorithm ha, PathFilter & filter = defaultPathFilter);
88
96
enum struct
FileIngestionMethod
: uint8_t {
103
Flat
,
104
111
NixArchive
,
112
121
Git
,
122
};
123
133
FileIngestionMethod parseFileIngestionMethod(std::string_view input);
134
140
std::string_view renderFileIngestionMethod(FileIngestionMethod method);
141
152
std::pair<Hash, std::optional<uint64_t>> hashPath(
153
const
SourcePath & path, FileIngestionMethod method, HashAlgorithm ha, PathFilter & filter = defaultPathFilter);
154
155
}
// namespace nix
nix::FileSerialisationMethod
FileSerialisationMethod
Definition
file-content-address.hh:20
nix::FileSerialisationMethod::Flat
@ Flat
Definition
file-content-address.hh:27
nix::FileSerialisationMethod::NixArchive
@ NixArchive
Definition
file-content-address.hh:36
nix::FileIngestionMethod
FileIngestionMethod
Definition
file-content-address.hh:96
nix::FileIngestionMethod::Git
@ Git
Definition
file-content-address.hh:121
nix::SourcePath
Definition
source-path.hh:22
libutil
include
nix
util
file-content-address.hh
Generated by
1.18.0