Skip to content

Instantly share code, notes, and snippets.

@sat0b
Created June 11, 2017 01:40
Show Gist options
  • Select an option

  • Save sat0b/87d24041f47589fabfd5ca989f5b9e84 to your computer and use it in GitHub Desktop.

Select an option

Save sat0b/87d24041f47589fabfd5ca989f5b9e84 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
int main() {
const fs::path path("dir");
boost::system::error_code error;
const bool result = fs::create_directory(path, error);
if (!result || error) {
std::cout << "failed creating directory" << std::endl;
}
}
@sat0b

sat0b commented Jun 11, 2017

Copy link
Copy Markdown
Author

g++ -l boost_filesystem -l boost_system test_mkdir.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment