22 #include <boost/filesystem/operations.hpp>
24 #if BOOST_VERSION < 106000
30 auto iter =
path.end();
31 boost::filesystem::path head =
path;
33 for (; !head.empty(); --iter) {
34 if (boost::filesystem::exists(head)) {
37 head.remove_filename();
41 return boost::filesystem::absolute(
path);
42 head = boost::filesystem::canonical(head);
44 boost::filesystem::path tail;
45 for (; iter !=
path.end(); ++iter) {
52 return boost::filesystem::absolute(head / tail);
60 static auto default_manager = std::make_shared<LRUFileManager>();
61 return default_manager;
86 for (
auto& fd : to_be_closed) {
87 fd->m_request_close();
99 handler_ptr = i->second.lock();
106 auto this_shared = this_weak.
lock();
109 this_shared->m_handlers.erase(canonical);