Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llfio/v2.0/path_view.hpp7
-rw-r--r--programs/illegal-codepoints/main.cpp4
2 files changed, 6 insertions, 5 deletions
diff --git a/include/llfio/v2.0/path_view.hpp b/include/llfio/v2.0/path_view.hpp
index f367a66a..469688e6 100644
--- a/include/llfio/v2.0/path_view.hpp
+++ b/include/llfio/v2.0/path_view.hpp
@@ -318,6 +318,8 @@ public:
path_view_component &operator=(const path_view_component &) = default;
path_view_component &operator=(path_view_component &&) = default;
~path_view_component() = default;
+
+ const byte *_raw_data() const noexcept { return _bytestr; }
//! True if empty
LLFIO_NODISCARD constexpr bool empty() const noexcept { return _length == 0; }
@@ -866,9 +868,6 @@ Some of the API for `std::filesystem::path` is replicated here, however any
APIs which modify the path other than taking subsets are obviously not
possible with borrowed views.
-\todo Lots of member functions remain to be implemented. `char8_t` and `char16_t`
-support is not implemented yet.
-
Each consumer of `path_view` defines what the "native platform transport" and
"native platform encoding" is. For LLFIO, the native platform transport is
defined to be `std::filesystem::path::value_type`, which is as follows:
@@ -1070,6 +1069,8 @@ public:
//! Swap the view with another
constexpr void swap(path_view &o) noexcept { _state.swap(o._state); }
+ const byte *_raw_data() const noexcept { return _state._bytestr; }
+
//! True if empty
LLFIO_NODISCARD LLFIO_PATH_VIEW_CONSTEXPR bool empty() const noexcept { return _state.empty(); }
LLFIO_PATH_VIEW_CONSTEXPR bool has_root_path() const noexcept { return !root_path().empty(); }
diff --git a/programs/illegal-codepoints/main.cpp b/programs/illegal-codepoints/main.cpp
index d00130d5..a86d0c4c 100644
--- a/programs/illegal-codepoints/main.cpp
+++ b/programs/illegal-codepoints/main.cpp
@@ -6142,7 +6142,7 @@ int main()
buffer[1] = (llfio::filesystem::path::value_type) n;
buffer[2] = 'z';
buffer[3] = 0;
- llfio::path_view leaf(buffer, 3);
+ llfio::path_view leaf(buffer, 3, true);
auto h = llfio::file(testdir, leaf, llfio::file_handle::mode::write, llfio::file_handle::creation::if_needed);
if(h)
{
@@ -6166,7 +6166,7 @@ int main()
auto &entry = entries[n];
if(entry.second == status::created)
{
- if(item.leafname == llfio::path_view(entry.first.data(), 3))
+ if(item.leafname == llfio::path_view(entry.first.data(), 3, true))
{
entry.second = status::found;
break;