title: How do I ignore hidden files (and files in hidden directories) with Boost Filesystem?
body: <p>I am iterating through all files in a directory recursively using the following:</p>
  
  <pre><code>try
  {
      for ( bf::recursive_directory_iterator end, dir("./");
            dir != end; ++dir )
      {
         const bf::path &amp;p = dir-&gt;path();
         if(bf::is_regular_file(p))
         {
             std::cout &lt;&lt; "File found: " &lt;&lt; p.string() &lt;&lt; std::endl;
         }
      }
  } catch (const bf::filesystem_error&amp; ex) {
      std::cerr &lt;&lt; ex.what() &lt;&lt; '\n';
  }
  </code></pre>
  
  <p>But this includes hidden files and files in hidden directories.</p>
  
  <p>How do I filter out these files?  If needed I can limit myself to platforms where hidden files and directories begin with the '.' character.</p>