diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-19 18:10:12 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-19 18:10:12 +0200 |
commit | 6aada88dc77a95a7b2726c39e008d4ddcd38d58c (patch) | |
tree | 12206f32a4f650860bfccc596c1607e5fb19e0c2 /butl/filesystem.ixx | |
parent | 2676fc8d88af82dff1033869823b435d9b91c9b8 (diff) |
Add dir_empty() test
Diffstat (limited to 'butl/filesystem.ixx')
-rw-r--r-- | butl/filesystem.ixx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/butl/filesystem.ixx b/butl/filesystem.ixx index af1125e..6062c38 100644 --- a/butl/filesystem.ixx +++ b/butl/filesystem.ixx @@ -4,6 +4,12 @@ namespace butl { + inline bool + dir_empty (const dir_path& d) + { + return dir_iterator (d) == dir_iterator (); + } + inline rmdir_status try_rmdir_r (const dir_path& p, bool ignore_error) { |