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:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-04-03 12:40:41 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-04-03 12:40:41 +0300
commit9e21c2f49d2691549fc20f472658ebc3e288584c (patch)
treeb395ae9819af2bee8255674cfb6a00b8f4699055 /include/llfio/v2.0/path_handle.hpp
parent434d73013a31d86cabf894328f13764b136579e2 (diff)
WiP merge of parts of the resumable_io branch into develop branch.
Diffstat (limited to 'include/llfio/v2.0/path_handle.hpp')
-rw-r--r--include/llfio/v2.0/path_handle.hpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/llfio/v2.0/path_handle.hpp b/include/llfio/v2.0/path_handle.hpp
index 1c5e2814..5a740315 100644
--- a/include/llfio/v2.0/path_handle.hpp
+++ b/include/llfio/v2.0/path_handle.hpp
@@ -1,5 +1,5 @@
/* A handle to a filesystem location
-(C) 2017 Niall Douglas <http://www.nedproductions.biz/> (20 commits)
+(C) 2017-2020 Niall Douglas <http://www.nedproductions.biz/> (20 commits)
File Created: Jul 2017
@@ -70,7 +70,10 @@ public:
{
}
//! Explicit conversion from handle permitted
- explicit constexpr path_handle(handle &&o) noexcept : handle(std::move(o)) {}
+ explicit constexpr path_handle(handle &&o) noexcept
+ : handle(std::move(o))
+ {
+ }
//! Move construction permitted
path_handle(path_handle &&) = default;
//! No copy construction (use `clone()`)
@@ -93,6 +96,13 @@ public:
o = std::move(temp);
}
+ //! Replaces `handle::clone()` with a `path_handle returning edition`
+ result<path_handle> clone() const noexcept
+ {
+ OUTCOME_TRY(newh, handle::clone());
+ return path_handle(std::move(newh));
+ }
+
/*! Create a path handle opening access to some location on the filing system.
Some operating systems provide a particularly lightweight method of doing this
(Linux: `O_PATH`, Windows: no access perms) which is much faster than opening