diff options
Diffstat (limited to 'src/dir.cpp')
-rw-r--r-- | src/dir.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dir.cpp b/src/dir.cpp index 327bc72..3238e62 100644 --- a/src/dir.cpp +++ b/src/dir.cpp @@ -13,6 +13,8 @@ * */ +#define NOMINMAX +#define WIN32_LEAN_AND_MEAN #include "filesystem.hpp" #include "dir.h" @@ -200,6 +202,13 @@ bool Dir::exists() const return fi.exists() && fi.isDir(); } +bool Dir::isEmpty(const std::string subdir) const +{ + fs::path pth = path(); + pth /= subdir; + return fs::is_empty(pth); +} + bool Dir::isRelative() const { return isRelativePath(p->path.string()); |