46 #ifndef OME_COMMON_FILESYSTEM_H 47 # define OME_COMMON_FILESYSTEM_H 49 # include <ome/common/config.h> 51 #include <boost/filesystem/operations.hpp> 52 #include <boost/filesystem/path.hpp> 64 using boost::filesystem::absolute;
66 using boost::filesystem::canonical;
76 boost::filesystem::path
78 boost::filesystem::path to)
80 from = absolute(from);
82 boost::filesystem::path ret;
83 boost::filesystem::path::const_iterator itrFrom(from.begin());
84 boost::filesystem::path::const_iterator itrTo(to.begin());
87 for(boost::filesystem::path::const_iterator toEnd(to.end()), fromEnd(from.end());
88 itrFrom != fromEnd && itrTo != toEnd && *itrFrom == *itrTo;
92 for(boost::filesystem::path::const_iterator fromEnd(from.end());
100 for (boost::filesystem::path::iterator begin = itrTo;
111 #endif // OME_COMMON_FILESYSTEM_H boost::filesystem::path make_relative(boost::filesystem::path from, boost::filesystem::path to)
Make a relative path.
Definition: filesystem.h:77
Open Microscopy Environment C++.
Definition: base64.h:48