Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
posix-fs-canonicalise.hh
Go to the documentation of this file.
1#pragma once
3
4#include <sys/stat.h>
5#include <sys/time.h>
6
7#include <filesystem>
8#include <memory>
9
10#include "nix/util/types.hh"
11#include "nix/util/error.hh"
12#include "nix/store/config.hh"
13
14namespace nix {
15
16typedef std::pair<dev_t, ino_t> Inode;
17typedef std::set<Inode> InodesSeen;
18
20{
21#ifndef _WIN32
27 std::optional<std::pair<uid_t, uid_t>> uidRange;
28#endif
29
30#if NIX_SUPPORT_ACL
37 const StringSet & ignoredAcls;
38#endif
39};
40
47#if NIX_SUPPORT_ACL
48# define NIX_WHEN_SUPPORT_ACLS(ARG) .ignoredAcls = ARG,
49# define NIX_WHEN_SUPPORT_ACLS2(ARG) ARG
50#else
51# define NIX_WHEN_SUPPORT_ACLS(ARG)
52# define NIX_WHEN_SUPPORT_ACLS2(ARG)
53#endif
54
68void canonicalisePathMetaData(
69 const std::filesystem::path & path, CanonicalizePathMetadataOptions options, InodesSeen & inodesSeen);
70
71void canonicalisePathMetaData(const std::filesystem::path & path, CanonicalizePathMetadataOptions options);
72
73void canonicaliseTimestampAndPermissions(const std::filesystem::path & path);
74
75class RestoreSinkHooks;
76
77std::unique_ptr<RestoreSinkHooks> makeCanonicalisingRestoreHooks(
78#if NIX_SUPPORT_ACL
79 const StringSet & ignoredAcls
80#endif
81);
82
83} // namespace nix
This file defines two main structs/classes used in nix error handling.
Definition posix-fs-canonicalise.hh:20
std::optional< std::pair< uid_t, uid_t > > uidRange
Definition posix-fs-canonicalise.hh:27
std::set< std::string, std::less<> > StringSet
Definition types.hh:45