file - Is there a function in C++ to determine if a specific certain folder in a given directory exists or not? -


is there simple such function in c++? appreciated.

you can use boost's filesystem library. example:

#include <iostream> #include <boost/filesystem.hpp>  int main(int argc, char* argv[]) {     boost::filesystem::path p("/path/to/directory");      if (exists(p))     {         std::cout << p << " exists!" << std::endl;     }      return 0; } 

note boost filesystem not header-only , requires library linking.


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -