Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
file-content-address.hh
Go to the documentation of this file.
1#pragma once
3
4#include "source-accessor.hh"
5
6namespace nix {
7
8struct SourcePath;
9
20enum struct FileSerialisationMethod : uint8_t {
28
37};
38
47FileSerialisationMethod parseFileSerialisationMethod(std::string_view input);
48
54std::string_view renderFileSerialisationMethod(FileSerialisationMethod method);
55
59void dumpPath(
60 const SourcePath & path,
61 Sink & sink,
62 FileSerialisationMethod method,
63 PathFilter & filter = defaultPathFilter);
64
70void restorePath(
71 const Path & path,
72 Source & source,
73 FileSerialisationMethod method,
74 bool startFsync = false);
75
76
87HashResult hashPath(
88 const SourcePath & path,
89 FileSerialisationMethod method, HashAlgorithm ha,
90 PathFilter & filter = defaultPathFilter);
91
99enum struct FileIngestionMethod : uint8_t {
107
115
125};
126
136FileIngestionMethod parseFileIngestionMethod(std::string_view input);
137
143std::string_view renderFileIngestionMethod(FileIngestionMethod method);
144
155std::pair<Hash, std::optional<uint64_t>> hashPath(
156 const SourcePath & path,
157 FileIngestionMethod method, HashAlgorithm ha,
158 PathFilter & filter = defaultPathFilter);
159
160}
FileSerialisationMethod
Definition file-content-address.hh:20
@ Flat
Definition file-content-address.hh:27
@ NixArchive
Definition file-content-address.hh:36
FileIngestionMethod
Definition file-content-address.hh:99
@ Git
Definition file-content-address.hh:124
std::string path
Definition lexer.l:1399
void startFsync() const
Definition source-path.hh:22