fs/FileSystem.hxx: add CheckAccess without mode parameter
This commit is contained in:
parent
8bf1640932
commit
06d7169674
@ -148,6 +148,20 @@ CheckAccess(Path path, int mode)
|
|||||||
#endif
|
#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.
|
* Checks if #Path exists and is a regular file.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user