aboutsummaryrefslogtreecommitdiff
path: root/build2/filesystem
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-01 23:31:27 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:37 +0200
commitb741291c708e5c2088680a0d9d3c75efd98db421 (patch)
tree5a21d56b272ddf0895cd0c221aaa9630927e9d21 /build2/filesystem
parent675d243e0ddeb627c0881b03e7cd5be746a5a7d3 (diff)
Make rmdir_r() to call entry_exists(path) rather than exists(dir_path)
Diffstat (limited to 'build2/filesystem')
-rw-r--r--build2/filesystem10
1 files changed, 8 insertions, 2 deletions
diff --git a/build2/filesystem b/build2/filesystem
index 325d28d..6a730c5 100644
--- a/build2/filesystem
+++ b/build2/filesystem
@@ -83,8 +83,8 @@ 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.
+ // Check for a file, directory or filesystem entry existence. Print the
+ // diagnostics and fail on system error.
//
bool
exists (const path&, bool follow_symlinks = true);
@@ -93,6 +93,12 @@ namespace build2
exists (const dir_path&);
bool
+ entry_exists (const path&, bool follow_symlinks = false);
+
+ // Check for a directory emptiness. Print the diagnostics and fail on system
+ // error.
+ //
+ bool
empty (const dir_path&);
}