Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
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
14
namespace
nix {
15
16
typedef
std::pair<dev_t, ino_t> Inode;
17
typedef
std::set<Inode> InodesSeen;
18
19
struct
CanonicalizePathMetadataOptions
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
68
void
canonicalisePathMetaData(
69
const
std::filesystem::path & path, CanonicalizePathMetadataOptions options, InodesSeen & inodesSeen);
70
71
void
canonicalisePathMetaData(
const
std::filesystem::path & path, CanonicalizePathMetadataOptions options);
72
73
void
canonicaliseTimestampAndPermissions(
const
std::filesystem::path & path);
74
75
class
RestoreSinkHooks;
76
77
std::unique_ptr<RestoreSinkHooks> makeCanonicalisingRestoreHooks(
78
#
if
NIX_SUPPORT_ACL
79
const
StringSet & ignoredAcls
80
#endif
81
);
82
83
}
// namespace nix
error.hh
This file defines two main structs/classes used in nix error handling.
nix::CanonicalizePathMetadataOptions
Definition
posix-fs-canonicalise.hh:20
nix::CanonicalizePathMetadataOptions::uidRange
std::optional< std::pair< uid_t, uid_t > > uidRange
Definition
posix-fs-canonicalise.hh:27
types.hh
nix::StringSet
std::set< std::string, std::less<> > StringSet
Definition
types.hh:45
libstore
include
nix
store
posix-fs-canonicalise.hh
Generated by
1.18.0