mirror of
https://github.com/NixOS/nix
synced 2025-06-27 21:01:16 +02:00
Merge remote-tracking branch 'origin/master' into flakes
This commit is contained in:
commit
17ca997fc6
46 changed files with 2021 additions and 189 deletions
|
@ -60,12 +60,12 @@ Path canonPath(const Path & path, bool resolveSymlinks = false);
|
|||
|
||||
/* Return the directory part of the given canonical path, i.e.,
|
||||
everything before the final `/'. If the path is the root or an
|
||||
immediate child thereof (e.g., `/foo'), this means an empty string
|
||||
is returned. */
|
||||
immediate child thereof (e.g., `/foo'), this means `/'
|
||||
is returned.*/
|
||||
Path dirOf(const Path & path);
|
||||
|
||||
/* Return the base name of the given canonical path, i.e., everything
|
||||
following the final `/'. */
|
||||
following the final `/' (trailing slashes are removed). */
|
||||
std::string_view baseNameOf(std::string_view path);
|
||||
|
||||
/* Check whether 'path' is a descendant of 'dir'. */
|
||||
|
@ -393,17 +393,6 @@ string replaceStrings(const std::string & s,
|
|||
std::string rewriteStrings(const std::string & s, const StringMap & rewrites);
|
||||
|
||||
|
||||
/* If a set contains 'from', remove it and insert 'to'. */
|
||||
template<typename T>
|
||||
void replaceInSet(std::set<T> & set, const T & from, const T & to)
|
||||
{
|
||||
auto i = set.find(from);
|
||||
if (i == set.end()) return;
|
||||
set.erase(i);
|
||||
set.insert(to);
|
||||
}
|
||||
|
||||
|
||||
/* Convert the exit status of a child as returned by wait() into an
|
||||
error string. */
|
||||
string statusToString(int status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue