Exemple #1
0
 BOOST_FILESYSTEM_DECL bool portable_directory_name(const std::string & name)
 {
   return
     name == "."
     || name == ".."
     || (portable_name(name)
       && name.find('.') == std::string::npos);
 }
Exemple #2
0
 BOOST_FILESYSTEM_DECL bool portable_file_name(const std::string & name)
 {
   std::string::size_type pos;
   return
      portable_name(name)
      && name != "."
      && name != ".."
      && ((pos = name.find('.')) == std::string::npos
          || (name.find('.', pos+1) == std::string::npos
            && (pos + 5) > name.length()))
     ;
 }
 /// Returns the portable name for given type information or `nullptr`
 /// if no mapping was found.
 inline const std::string*
 portable_name(const std::pair<uint16_t, const std::type_info*>& x) const {
   return portable_name(x.first, x.second);
 }