diff options
Diffstat (limited to 'include/llfio/v2.0/path_handle.hpp')
-rw-r--r-- | include/llfio/v2.0/path_handle.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llfio/v2.0/path_handle.hpp b/include/llfio/v2.0/path_handle.hpp index e2ee965c..87798c04 100644 --- a/include/llfio/v2.0/path_handle.hpp +++ b/include/llfio/v2.0/path_handle.hpp @@ -93,6 +93,16 @@ public: //! \overload LLFIO_MAKE_FREE_FUNCTION static LLFIO_HEADERS_ONLY_MEMFUNC_SPEC result<path_handle> path(path_view_type _path) noexcept { return path(path_handle(), _path); } + + /*! Clone this handle (copy constructor is disabled to avoid accidental copying). + */ + result<path_handle> clone() const noexcept + { + auto *h = static_cast<const handle *>(this); + OUTCOME_TRY(ret, h->clone()); + auto nativeh = ret.release(); + return path_handle(nativeh); + } }; //! \brief Constructor for `path_handle` |