[IO] More efficient file check
This commit is contained in:
parent
49c0b7d3a1
commit
ff15fb07fc
@ -6,7 +6,8 @@ namespace Utils
|
||||
{
|
||||
bool FileExists(std::string file)
|
||||
{
|
||||
return std::ifstream(file).good();
|
||||
//return std::ifstream(file).good();
|
||||
return GetFileAttributesA(file.data()) != INVALID_FILE_ATTRIBUTES;
|
||||
}
|
||||
|
||||
bool WriteFile(std::string file, std::string data, bool append)
|
||||
|
Loading…
Reference in New Issue
Block a user