Visual Studio Code – Why does std::filesystem::remove() error_code return "unknown error" if the file does not exist?
I want to use the std::filesystem::remove() function to remove a file, and give an error if the file does not exist. Something like this: std::error_code errorCode; if (!std::filesystem::remove("<some file path>", errorCode)) { std::cout << "Could not delete file because "…