diff options
Diffstat (limited to 'libbutl/filesystem.ixx')
-rw-r--r-- | libbutl/filesystem.ixx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libbutl/filesystem.ixx b/libbutl/filesystem.ixx index a0ddc22..f7c3777 100644 --- a/libbutl/filesystem.ixx +++ b/libbutl/filesystem.ixx @@ -38,6 +38,17 @@ namespace butl return e ? rmdir_status::success : rmdir_status::not_exist; } + inline path + followsymlink (const path& p) + { + std::pair<path, bool> r (try_followsymlink (p)); + + if (!r.second) + throw_generic_error (ENOENT); + + return std::move (r.first); + } + // auto_rm // template <typename P> |