Skip to content
Snippets Groups Projects
Verified Commit a1f60635 authored by Lars Bilke's avatar Lars Bilke
Browse files

[BL] Refactored IsFileExisting().

parent 04676057
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment