boost::filesystem::path p("/path/to/file.txt");
if (boost::filesystem::exists(p)) { // do something }
boost::filesystem::create_directory("/path/to/new/directory");This creates a new directory at "/path/to/new/directory". The Boost.Filesystem library is part of the Boost C++ Libraries package.