2 ms·
Some stuff that could be improved with modern C++, Instead of static bool file_exists(const std::string &p) { struct stat st{}; return ::stat(p.c_
by pjmlp 1y ago
Some stuff that could be improved with modern C++,
Instead of
static bool file_exists(const std::string &p) {
struct stat st{}; return ::stat(p.c_str(), &st) == 0;
}
Use the filesystem API,
std::filesystem::exists(path);
-- https://en.cppreference.com/w/cpp/filesystem.html https://en.cppreference.com/w/cpp/filesystem.html
- beligum 1y agoty!