
Hi Jeff,
Thanks for the reply.
I caught the exception using this code:
try{ create_directory(bundle_path); } catch(boost::system::system_error const &e) { cerr<
Hi, Here is the code snippet I am using under windows in VS2008. #define BOOST_WINDOWS_PATH #define BOOST_WINDOWS_API
You shouldn't be manually defining these, and would normally get a compile error...
#include "stdafx.h"
but you probably are configure to use precompiled headers, so anything before stdafx.h is ignored.
#include
#include #include <iostream> #include "string" #include "conio.h" #include "vector" using namespace std; using namespace boost::filesystem; int _tmain(int argc, _TCHAR* argv[]) { string _path = "E:\\doggy"; path dir_path(_path.c_str()); vector< pair > _file_jpeg_pair; string full_list_path = _path+"\\" + "list.txt"; string bundle_path_str = _path+"\\" + "bundle"; path bundle_path(_path.c_str()); //creating bundle directory cout<
Catch the unhandled exception and see what the problem is. Filesystem throws boost::system::system_error exceptions.
Strange thing is the Windows path E:\doggy is being printed as E:/doggy, seems like the path is getting converted to POSIX format.
Depending on the boost filesystem version you can ask for native formatted strings. Jeff _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users