21 using namespace std::filesystem;
29 class path :
public std::filesystem::path {
31 using std::filesystem::path::path;
36 std::filesystem::path::operator=(std::move(
path));
40 std::filesystem::path::operator/=(std::move(
path));
46 path(
const char *c) : std::filesystem::
path(c) {}
48 std::filesystem::path::operator=(c);
52 std::filesystem::path::operator/=(c);
56 std::filesystem::path::append(c);
62 path(std::string) =
delete;
75 std::filesystem::path::make_preferred();
78 path filename()
const {
return std::filesystem::path::filename(); }
94 static inline auto quoted(
const std::string &s) {
107 copy_options options) {
138 return path.u8string();
140 static_assert(std::is_same<path::string_type, std::string>::value,
141 "PathToString not implemented on this platform");
142 return path.std::filesystem::path::string();
151 return u8path(
string);
153 return std::filesystem::path(
string);
164 if (std::filesystem::is_symlink(p) && std::filesystem::is_directory(p)) {
176 std::error_code &ec) =
delete;
213 void *hFile = (
void *)-1;
226 inline void formatValue(std::ostream &,
const char *,
const char *,
int,
227 const std::filesystem::path &) =
delete;
229 inline void formatValue(std::ostream &,
const char *,
const char *,
int,
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
path & append(const char *c)
path(std::filesystem::path path)
std::string string() const =delete
path & append(std::string)=delete
path & operator=(std::string)=delete
path & operator=(std::filesystem::path path)
path & operator=(const char *c)
path & operator/=(std::string)=delete
path & operator/=(const char *c)
path & operator/=(std::filesystem::path path)
FileLock(FileLock &&)=delete
FileLock(const FileLock &)=delete
Filesystem operations and types.
bool create_directories(const std::filesystem::path &p, std::error_code &ec)=delete
This variant is not used.
static path absolute(const path &p)
static bool create_directories(const std::filesystem::path &p)
Create directory (and if necessary its parents), unless the leaf directory already exists or is a sym...
static auto quoted(const std::string &s)
static bool exists(const path &p)
static bool copy_file(const path &from, const path &to, copy_options options)
static std::string PathToString(const path &path)
Convert path object to a byte string.
static path PathFromString(const std::string &string)
Convert byte string to path object.
static path operator+(path p1, path p2)
Bridge operations to C stdio.
fs::path GetTempDirectoryPath()
FILE * fopen(const fs::path &p, const char *mode)
std::string get_filesystem_error_message(const fs::filesystem_error &e)
fs::path AbsPathJoin(const fs::path &base, const fs::path &path)
Helper function for joining two paths.
FILE * freopen(const fs::path &p, const char *mode, FILE *stream)