Go to the documentation of this file.
2 #if(__cplusplus >= 201703L) || (_MSVC_LANG >= 201703L)
3 #define DEPTHAI_NODISCARD [[nodiscard]]
4 #if(defined(_MSC_VER)) || (defined(__has_include) && __has_include(<filesystem>)) || (__cplusplus >= 202002L)
8 #define DEPTHAI_NODISCARD
29 #if defined(_WIN32) && defined(_MSC_VER)
64 #if defined(__cpp_lib_filesystem)
72 #if defined(__cpp_lib_char8_t)
78 Path(
const std::u8string& source) :
Path(
std::filesystem::path(source)) {}
85 Path(
const char8_t* source) :
Path(
std::filesystem::path(source)) {}
89 #if defined(_WIN32) && defined(_MSC_VER)
91 static std::wstring convert_utf8_to_wide(
const std::string& utf8string);
99 Path(
const std::string& source) :
_nativePath(convert_utf8_to_wide(source)) {}
116 std::string
string()
const;
118 #if defined(__cpp_lib_char8_t)
127 return std::filesystem::path(
_nativePath).u8string();
149 #if defined(__cpp_lib_char8_t)
156 return std::filesystem::path(
_nativePath).u8string();
std::string u8string() const
Get path in utf-8.
bool empty() const noexcept
Observes if path is empty (contains no string/folders/filename)
Path(string_type &&source) noexcept
Construct Path object from source.
char value_type
character used by native-encoding of filesystem
Path & operator=(const Path &)=default
std::string string() const
Get path in native-encoding string; no conversion.
Path(const value_type *source)
Construct Path object from source.
std::basic_string< value_type > string_type
Path(const string_type &source)
Construct Path object from source.
Represents paths on a filesystem; accepts utf-8, Windows utf-16 wchar_t, or std::filesystem::path.
const string_type & native() const noexcept
Returns native-encoding string by const reference, suitable for use with OS APIs.
depthai
Author(s): Martin Peterlin
autogenerated on Sat Mar 22 2025 02:58:19