7 #include <boost/version.hpp>
8 #if (BOOST_VERSION <= 103301)
9 #include <boost/filesystem/path.hpp>
10 #include <boost/filesystem/operations.hpp>
12 #include <boost/filesystem.hpp>
15 using namespace boost;
27 static const string fileProtocolHeader1(
"file://");
28 static const string fileProtocolHeader2(
"file:");
30 size_t pos = url.find( fileProtocolHeader1 );
32 url.erase( 0, fileProtocolHeader1.size() );
34 size_t pos = url.find( fileProtocolHeader2 );
36 url.erase( 0, fileProtocolHeader2.size() );
41 if ( url.find(
":") == 2 && url.find(
"/") ==0 )
61 #if (BOOST_VERSION < 104600)
62 filesystem::path filepath(
deleteURLScheme(srcUrl), filesystem::native);
64 refUrl = filesystem::system_complete(filepath).file_string();
66 filesystem::path filepath(rootDir +
deleteURLScheme(srcUrl), filesystem::native);
67 if(filesystem::exists(filepath)){
68 refUrl = system_complete(filepath).file_string();
71 #elif (BOOST_VERSION >= 105000)
72 filesystem::path filepath(
deleteURLScheme(srcUrl), (
void *)filesystem::native);
74 refUrl = filesystem::system_complete(filepath).string();
76 filesystem::path filepath(rootDir +
deleteURLScheme(srcUrl), (
void *)filesystem::native);
77 if(filesystem::exists(filepath)){
78 refUrl = system_complete(filepath).string();
82 filesystem3::path filepath(
deleteURLScheme(srcUrl), (
void *)filesystem3::native);
84 refUrl = filesystem3::system_complete(filepath).string();
86 filesystem3::path filepath(rootDir +
deleteURLScheme(srcUrl), (
void *)filesystem3::native);
87 if(filesystem::exists(filepath)){
88 refUrl = system_complete(filepath).string();
108 string::size_type pos = ref.find(
":");
109 if ( pos == string::npos || pos == 1 )
114 if( ref.find(
"file:") == 0 )