diff --git a/BaseLib/FileTools.cpp b/BaseLib/FileTools.cpp index 545dc17436e08d6c4051ad4ae16b669df0cc5ac9..6f32612f4637da5d36a029199b13ae1351dba63f 100644 --- a/BaseLib/FileTools.cpp +++ b/BaseLib/FileTools.cpp @@ -14,10 +14,8 @@ #include "FileTools.h" #include "Error.h" -#include "StringTools.h" #include "filesystem.h" -#include <sys/stat.h> #include <boost/algorithm/string.hpp> namespace @@ -36,8 +34,7 @@ namespace BaseLib */ bool IsFileExisting(const std::string &strFilename) { - struct stat buffer {}; - return (stat (strFilename.c_str(), &buffer) == 0); + return fs::exists(fs::path(strFilename)); } double swapEndianness(double const& v)