<commit_before>// //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
// STL
#include <cassert>
// Boost (STL Extension)
// Boost Filesystem (http://www.boost.org/doc/libs/1_41_0/libs/filesystem/doc/index.htm)
#include <boost/version.hpp>
#if BOOST_VERSION >= 103500
#include <boost/filesystem.hpp>
#else
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
#endif
// StdAir
#include <stdair/basic/BasFileMgr.hpp>

namespace boostfs = boost::filesystem;

namespace stdair {

  // //////////////////////////////////////////////////////////////////////
  bool BasFileMgr::doesExistAndIsReadable (const std::string& iFilepath) {
    bool oFine = false;
    
    boostfs::path lPath (iFilepath);

    if (boostfs::exists (lPath) == false) {
      return oFine;
    }

#if BOOST_VERSION >= 103500
    if (boostfs::is_regular (lPath) == true) {
      oFine = true;
    }
#endif

    return oFine;
  }
  
}<commit_msg>[Dev] Added pragma directives to support Boost versions lower than 1.35 (e.g., for RedHat/CentOS 5).<commit_after>// //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
// STL
#include <cassert>
// Boost (STL Extension)
// Boost Filesystem (http://www.boost.org/doc/libs/1_41_0/libs/filesystem/doc/index.htm)
#include <boost/version.hpp>
#if BOOST_VERSION >= 103500
#include <boost/filesystem.hpp>
#else // BOOST_VERSION >= 103500
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
#endif // BOOST_VERSION >= 103500
// StdAir
#include <stdair/basic/BasFileMgr.hpp>

namespace boostfs = boost::filesystem;

namespace stdair {

  // //////////////////////////////////////////////////////////////////////
  bool BasFileMgr::doesExistAndIsReadable (const std::string& iFilepath) {
    bool oFine = false;
    
    boostfs::path lPath (iFilepath);

    if (boostfs::exists (lPath) == false) {
      return oFine;
    }

#if BOOST_VERSION >= 103500
    if (boostfs::is_regular (lPath) == true) {
      oFine = true;
    }
#endif // BOOST_VERSION >= 103500

    return oFine;
  }
  
}
{'fraction_non_alphanumeric': 0.3027360988526037, 'fraction_numerical': 0.02383053839364519, 'mean_word_length': 1.7247596153846154, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4873026', 'n_tokens_mistral': 727, 'n_tokens_neox': 661, 'n_words': 144}