Skip to content

Commit

Permalink
fs: Remove platform-specific 'fs_fileExists'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelheilmann committed Jan 19, 2018
1 parent 1e342fe commit 83242c1
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions egolib/src/egolib/file_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,9 @@ bool fs_copyFile(const std::string& source, const std::string& target)
}

//--------------------------------------------------------------------------------------------
int fs_fileExists(const std::string& filename)
int fs_fileExists(const std::string& pathname)
{
if (filename.empty())
{
return -1;
}
FILE *ptmp = fopen(filename.c_str(), "rb");
if (ptmp)
{
fclose(ptmp);
return 1;
}
return 0;
return id::file_system::exists(pathname) ? 1 : 0;
}

//--------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 83242c1

Please sign in to comment.