On Wed, 10 Apr 2013 20:43:15 +0200, SRD
[...]Can anyone offer some insight as to how this should work? Any help much appreciated.
I strongly recommend you to read the tutorial at http://www.boost.org/doc/libs/1_53_0/doc/html/boost_asio/tutorial.html or the chapter http://en.highscore.de/cpp/boost/asio.html from where you downloaded the file monitor to get a basic understanding how Boost.Asio is used.
[...] boost::asio::io_service io_service; boost::asio::dir_monitor dm(io_service);
dm.add_directory("C:\\Users\\SRD\\DirA");
boost::asio::dir_monitor_event ev = dm.monitor(); dm.async_monitor(create_file_handler);
You should call either monitor() or async_monitor(). The first is a blocking call, the second an asynchronous call. The call to monitor() only returns when something happened. If nothing happens monitor() never returns. async_monitor() returns immediately though. And when something happens create_file_handler() is called. Boris
[...]