aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fs/FileSystem.hxx14
1 files changed, 14 insertions, 0 deletions
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
@@ -149,6 +149,20 @@ CheckAccess(Path path, int mode)
}
/**
+ * 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.
*/
static inline bool