aboutsummaryrefslogtreecommitdiff
path: root/build2/filesystem
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-09-09 18:29:37 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-09-13 13:03:19 +0300
commitdc1b424b75f200a716c3bd9b91891cf7f818ad32 (patch)
tree6c1625d8a52ad7ddc642da72f3c1f8896b617ff2 /build2/filesystem
parentc49a4f0aeefd04ea6a269693d47d1e9d91ed8ad7 (diff)
Fix crashing on unhandled system_error thrown by file_exists()
Diffstat (limited to 'build2/filesystem')
-rw-r--r--build2/filesystem9
1 files changed, 9 insertions, 0 deletions
diff --git a/build2/filesystem b/build2/filesystem
index 1dcf8bd..1b03c0e 100644
--- a/build2/filesystem
+++ b/build2/filesystem
@@ -82,6 +82,15 @@ namespace build2
//
fs_status<rmdir_status>
rmdir_r (const dir_path&, bool dir = true, uint16_t verbosity = 1);
+
+ // Check for a file or directory existence. Print the diagnostics and fail on
+ // system error.
+ //
+ bool
+ exists (const path&, bool follow_symlinks = true);
+
+ bool
+ exists (const dir_path&);
}
#include <build2/filesystem.txx>