Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
environment-variables.hh
Go to the documentation of this file.
1
#pragma once
8
9
#include <optional>
10
11
#include "
nix/util/types.hh
"
12
#include "
nix/util/os-string.hh
"
13
14
namespace
nix {
15
19
std::optional<std::string> getEnv(
const
std::string & key);
20
24
std::optional<OsString>
getEnvOs
(
const
OsString
& key);
25
29
OsStringMap
getEnvOs
();
30
35
std::optional<std::string> getEnvNonEmpty(
const
std::string & key);
36
41
std::optional<OsString> getEnvOsNonEmpty(
const
OsString
& key);
42
46
StringMap
getEnv();
47
56
void
setEnv
(
const
char
* name,
const
char
* value);
57
61
void
setEnvOs
(
const
OsString
& name,
const
OsString
& value);
62
70
void
unsetEnv
(
const
char
* name);
71
75
void
unsetEnvOs
(
const
OsChar
* name);
76
80
void
clearEnv();
81
85
void
replaceEnv(
const
StringMap
& newEnv);
86
87
}
// namespace nix
nix::setEnvOs
void setEnvOs(const OsString &name, const OsString &value)
Definition
environment-variables.cc:33
nix::unsetEnv
void unsetEnv(const char *name)
Definition
environment-variables.cc:60
nix::getEnvOs
std::optional< OsString > getEnvOs(const OsString &key)
Definition
environment-variables.cc:13
nix::setEnv
void setEnv(const char *name, const char *value)
Definition
environment-variables.cc:55
nix::unsetEnvOs
void unsetEnvOs(const OsChar *name)
Definition
environment-variables.cc:39
os-string.hh
nix::OsChar
char OsChar
Definition
os-string.hh:21
nix::OsString
std::basic_string< OsChar > OsString
Definition
os-string.hh:36
nix::OsStringMap
std::map< OsString, OsString, std::less<> > OsStringMap
Definition
os-string.hh:46
types.hh
nix::StringMap
std::map< std::string, std::string, std::less<> > StringMap
Definition
types.hh:26
libutil
include
nix
util
environment-variables.hh
Generated by
1.18.0