mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
This ended up motivating a good deal of other infra improvements in order to get Windows right: - `OsString` to complement `std::filesystem::path` - env var code for working with the underlying `OsString`s - Rename `PATHNG_LITERAL` to `OS_STR` - `NativePathTrait` renamed to `OsPathTrait`, given a character template parameter until #9205 is complete. Split `tests.cc` matching split of `util.{cc,hh}` last year. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
21 lines
296 B
C++
21 lines
296 B
C++
#include <algorithm>
|
|
#include <codecvt>
|
|
#include <iostream>
|
|
#include <locale>
|
|
|
|
#include "file-path.hh"
|
|
#include "util.hh"
|
|
|
|
namespace nix {
|
|
|
|
std::optional<std::filesystem::path> maybePath(PathView path)
|
|
{
|
|
return { path };
|
|
}
|
|
|
|
std::filesystem::path pathNG(PathView path)
|
|
{
|
|
return path;
|
|
}
|
|
|
|
}
|