memgraph/include/utils/file.hpp

21 lines
274 B
C++
Raw Normal View History

2016-09-14 19:19:56 +08:00
#pragma once
#include <fstream>
namespace utils
{
inline bool fexists(const char *filename)
{
std::ifstream ifile(filename);
return (bool)ifile;
}
inline bool fexists(const std::string& filename)
{
std::ifstream ifile(filename.c_str());
return (bool)ifile;
}
}