Since C++17 filesystem library is available and you should use this library. It provides std::filesystem::exists() call. This call is based on path logic and it could be absolute and relative from the required directory. It works if you process has enough rights to perform those operation, in other words file might exist, but you process could lack of rights to check it