Implement exists with access instead of stat.
This commit is contained in:
parent
10de10b9c2
commit
f03d702d84
|
@ -17,8 +17,9 @@ using namespace nv;
|
||||||
bool FileSystem::exists(const char * path)
|
bool FileSystem::exists(const char * path)
|
||||||
{
|
{
|
||||||
#if NV_OS_UNIX
|
#if NV_OS_UNIX
|
||||||
struct stat buf;
|
return access(path, F_OK|R_OK) == 0;
|
||||||
return stat(path, &buf) == 0;
|
//struct stat buf;
|
||||||
|
//return stat(path, &buf) == 0;
|
||||||
#else
|
#else
|
||||||
if (FILE * fp = fopen(path, "r"))
|
if (FILE * fp = fopen(path, "r"))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user