Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
file-path.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include <filesystem>
5
6
#include "
nix/util/types.hh
"
7
#include "
nix/util/os-string.hh
"
8
#include "
nix/util/json-non-null.hh
"
9
10
namespace
nix {
11
15
typedef
std::list<std::filesystem::path>
Paths
;
16
typedef
std::set<std::filesystem::path> PathSet;
17
22
struct
PathView :
OsStringView
23
{
24
using
string_view =
OsStringView
;
25
26
using
string_view::string_view;
27
28
PathView(
const
std::filesystem::path & path)
29
:
OsStringView
{path.native()}
30
{
31
}
32
33
PathView(
const
OsString
& path)
34
:
OsStringView
{path}
35
{
36
}
37
38
const
string_view & native()
const
39
{
40
return
*
this
;
41
}
42
43
string_view & native()
44
{
45
return
*
this
;
46
}
47
};
48
49
template
<>
50
struct
json_avoids_null<std::filesystem::path> : std::true_type
51
{};
52
53
}
// namespace nix
nix::Paths
std::list< std::filesystem::path > Paths
Definition
file-path.hh:15
json-non-null.hh
os-string.hh
nix::OsString
std::basic_string< OsChar > OsString
Definition
os-string.hh:36
nix::OsStringView
std::basic_string_view< OsChar > OsStringView
Definition
os-string.hh:41
types.hh
libutil
include
nix
util
file-path.hh
Generated by
1.18.0