From 6aada88dc77a95a7b2726c39e008d4ddcd38d58c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 19 Aug 2016 18:10:12 +0200 Subject: Add dir_empty() test --- butl/filesystem | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'butl/filesystem') diff --git a/butl/filesystem b/butl/filesystem index 118fa01..41b9266 100644 --- a/butl/filesystem +++ b/butl/filesystem @@ -32,17 +32,23 @@ namespace butl { + // Return true if the path is to an existing regular file. Note that + // this function resolves symlinks. + // + LIBBUTL_EXPORT bool + file_exists (const path&); + // Return true if the path is to an existing directory. Note that // this function resolves symlinks. // LIBBUTL_EXPORT bool dir_exists (const path&); - // Return true if the path is to an existing regular file. Note that - // this function resolves symlinks. + // Return true if the directory is empty. Note that the path must exist + // and be a directory. // LIBBUTL_EXPORT bool - file_exists (const path&); + dir_empty (const dir_path&); // Try to create a directory unless it already exists. If you expect // the directory to exist and performance is important, then you -- cgit v1.1