00001
00002
00003
00004
00005 #include <cassert>
00006
00007
00008 #include <boost/version.hpp>
00009 #if BOOST_VERSION >= 103500
00010 #include <boost/filesystem.hpp>
00011 #else // BOOST_VERSION >= 103500
00012 #include <boost/filesystem/path.hpp>
00013 #include <boost/filesystem/operations.hpp>
00014 #endif // BOOST_VERSION >= 103500
00015
00016 #include <stdair/basic/BasFileMgr.hpp>
00017
00018 namespace boostfs = boost::filesystem;
00019
00020 namespace stdair {
00021
00022
00023 bool BasFileMgr::doesExistAndIsReadable (const std::string& iFilepath) {
00024 bool oFine = false;
00025
00026 boostfs::path lPath (iFilepath);
00027
00028 if (boostfs::exists (lPath) == false) {
00029 return oFine;
00030 }
00031
00032 #if BOOST_VERSION >= 103500
00033 if (boostfs::is_regular (lPath) == true) {
00034 oFine = true;
00035 }
00036 #endif // BOOST_VERSION >= 103500
00037
00038 return oFine;
00039 }
00040
00041 }