summaryrefslogtreecommitdiff
path: root/lib/System/Win32
diff options
context:
space:
mode:
Diffstat (limited to 'lib/System/Win32')
-rw-r--r--lib/System/Win32/Path.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc
index 994bc671c1..2484b8a744 100644
--- a/lib/System/Win32/Path.inc
+++ b/lib/System/Win32/Path.inc
@@ -254,6 +254,13 @@ Path::exists() const {
}
bool
+Path::isDirectory() const {
+ DWORD attr = GetFileAttributes(path.c_str());
+ return (attr != INVALID_FILE_ATTRIBUTES) &&
+ (attr & FILE_ATTRIBUTE_DIRECTORY);
+}
+
+bool
Path::canRead() const {
// FIXME: take security attributes into account.
DWORD attr = GetFileAttributes(path.c_str());