5#include <Common/Utility/string_utils.h>
6#include <Common/compiler.h>
35 explicit Path(std::string path);
40 explicit Path(std::string_view path);
51 explicit Path(
const char* path);
53 explicit Path(std::filesystem::path path);
93 std::size_t* out_numTotalChars =
nullptr,
94 bool isNullTerminated =
true)
const;
150 static wchar_t charToWchar(
const char ch);
152 std::filesystem::path m_path;
157 return m_path.is_relative();
162 return m_path.is_absolute();
167 return m_path.empty();
PH_DEFINE_INLINE_TO_STRING_FORMATTER(ph::Path)
General path representation. Does not check whether the target actually exists (e....
Definition Path.h:21
bool isRelative() const
Definition Path.h:155
Path removeExtension() const
Removes filename extension in the path, if any.
Definition Path.cpp:227
Path append(const Path &other) const
Definition Path.cpp:104
std::filesystem::path toStdPath() const
Get a standard path representation of this path.
Definition Path.h:175
void clear()
Definition Path.h:170
bool operator==(const Path &other) const
Definition Path.cpp:141
Path getLeadingElement() const
Definition Path.cpp:194
Path removeLeadingSeparator() const
Definition Path.cpp:146
std::string getFilename() const
Returns the filename if present.
Definition Path.cpp:184
std::string toNativeString() const
Get a string representation of this path in native format.
Definition Path.cpp:232
Path removeTrailingSeparator() const
Definition Path.cpp:165
Path getParent() const
Definition Path.cpp:217
std::string toString() const
Get a string representation of this path in generic format.
Definition Path.cpp:121
Path getTrailingElement(bool ignoreTrailingSeparator=true) const
Definition Path.cpp:201
Path toAbsolute() const
Definition Path.cpp:116
Path()
Creates empty path.
Definition Path.cpp:80
Path replaceExtension(std::string_view replacement) const
Changes filename extension in the path, if any. The behavior is the same as std::filesystem::path::re...
Definition Path.cpp:222
bool isEmpty() const
Definition Path.h:165
std::string getExtension() const
Returns filename extension if present. The extension string will start with a period character "....
Definition Path.cpp:189
Path operator/(const Path &other) const
Definition Path.cpp:131
std::string toAbsoluteString() const
Definition Path.cpp:126
bool isAbsolute() const
Definition Path.h:160
The root for all renderer implementations.
Definition EEngineProject.h:6
std::span< const T, EXTENT > TSpanView
Same as TSpan, except that the objects are const-qualified. Note that for pointer types,...
Definition TSpan.h:19
std::span< T, EXTENT > TSpan
A contiguous sequence of objects of type T. Effectively the same as std::span.
Definition TSpan.h:12