fs/FileSystem.hxx: add CheckAccess without mode parameter

This commit is contained in:
Denis Krjuchkov 2013-12-05 14:39:19 +06:00
parent 8bf1640932
commit 06d7169674

View File

@ -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.
*/