[IO] More efficient file check

This commit is contained in:
momo5502 2017-06-02 22:18:00 +02:00
parent 49c0b7d3a1
commit ff15fb07fc

View File

@ -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)