diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2018-08-01 11:52:21 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2018-08-01 11:52:21 +0300 |
commit | e2434aa9d42d50651ed9685b5125f58262366081 (patch) | |
tree | 4ea28d1014d83bf36adf74cd9cf9b8b4029d7bc7 /include/llfio/v2.0/path_handle.hpp | |
parent | 964d174c1c44d4810789b198bbf07271cebbe8c8 (diff) |
Add preliminary symlink_handle implementation for POSIX.
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` |