#include <filesystem> void do_something() { if (std::filesystem::exists(FILE_PATH)) { std::cout << "yes, that file exists" << std::endl; } }