Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
archive.hh
Go to the documentation of this file.
1#pragma once
3
4#include "nix/util/types.hh"
6#include "nix/util/fs-sink.hh"
7
8namespace nix {
9
18constexpr size_t narMaxDepth = 64;
19
68void dumpPath(const std::filesystem::path & path, Sink & sink, PathFilter & filter = defaultPathFilter);
69
73time_t dumpPathAndGetMtime(const std::filesystem::path & path, Sink & sink, PathFilter & filter = defaultPathFilter);
74
80void dumpString(std::string_view s, Sink & sink);
81
82void parseDump(FileSystemObjectSink & sink, Source & source);
83
84void restorePath(
85 const std::filesystem::path & path,
86 Source & source,
87 bool startFsync = false,
88 RestoreSinkHooks * hooks = nullptr
89);
90
94void copyNAR(Source & source, Sink & sink);
95
96inline constexpr std::string_view narVersionMagic1 = "nix-archive-1";
97
98inline constexpr std::string_view caseHackSuffix = "~nix~case~hack~";
99
100} // namespace nix
constexpr size_t narMaxDepth
Definition archive.hh:18
Definition fs-sink.hh:151
fun< bool(const std::string &path)> PathFilter
Definition file-system.hh:494
Definition fs-sink.hh:39
Definition serialise.hh:18
Definition serialise.hh:95