mirror of
https://github.com/NixOS/nix
synced 2025-07-05 04:01:47 +02:00
Progress on #9205 Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems> * Get rid of `PathNG`, just use `std::filesystem::path`
31 lines
506 B
C++
31 lines
506 B
C++
#include <algorithm>
|
|
#include <codecvt>
|
|
#include <iostream>
|
|
#include <locale>
|
|
|
|
#include "file-path.hh"
|
|
#include "util.hh"
|
|
|
|
namespace nix {
|
|
|
|
std::string os_string_to_string(PathViewNG::string_view path)
|
|
{
|
|
return std::string { path };
|
|
}
|
|
|
|
std::filesystem::path::string_type string_to_os_string(std::string_view s)
|
|
{
|
|
return std::string { s };
|
|
}
|
|
|
|
std::optional<std::filesystem::path> maybePath(PathView path)
|
|
{
|
|
return { path };
|
|
}
|
|
|
|
std::filesystem::path pathNG(PathView path)
|
|
{
|
|
return path;
|
|
}
|
|
|
|
}
|