From 06d71696745388c5663fdd676ffbfd783459f6fc Mon Sep 17 00:00:00 2001
From: Denis Krjuchkov <denis@crazydev.net>
Date: Thu, 5 Dec 2013 14:39:19 +0600
Subject: fs/FileSystem.hxx: add CheckAccess without mode parameter

---
 src/fs/FileSystem.hxx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'src')

diff --git a/src/fs/FileSystem.hxx b/src/fs/FileSystem.hxx
index b4dd01cd3..66fe77d31 100644
--- a/src/fs/FileSystem.hxx
+++ b/src/fs/FileSystem.hxx
@@ -148,6 +148,20 @@ CheckAccess(Path path, int mode)
 #endif
 }
 
+/**
+ * Checks is specified path exists and accessible.
+ */
+static inline bool
+CheckAccess(Path path)
+{
+#ifdef WIN32
+	struct stat buf;
+	return StatFile(path, buf);
+#else
+	return CheckAccess(path, F_OK);
+#endif
+}
+
 /**
  * Checks if #Path exists and is a regular file.
  */
-- 
cgit v1.2.3