title: Filtering folders in Boost Filesystem
body: <p>I want to get all the files inside a concrete folder (in this case Documents) with Boost Filesystem in Windows.</p>
  
  <p>For this I make a filter to assure I get no folders.</p>
  
  <p>The problem is that when I still get the following folders : </p>
  
  <pre><code>"C:\....\Documents\My Videos", 
  "C:\....\Documents\My Music",
  "C:\....\Documents\My Pictures"
  </code></pre>
  
  <p>(I don't get some other folders)</p>
  
  <p>The code is the following:</p>
  
  <pre><code>boost::filesystem::directory_iterator end;
  for (boost::filesystem::directory_iterator iter(documentsFolder); iter != end; ++iter){
      if (!is_directory(*iter)){
          std::cout &lt;&lt; iter-&gt;path() &lt;&lt; "\n";
      }
      else{
          std::cout &lt;&lt; "--------&gt;&gt;&gt;" &lt;&lt; iter-&gt;path() &lt;&lt; "\n";
      }
  </code></pre>
  
  <p>Is there any way to avoid this folders without making a manual filtering?</p>
  
  <p>Thanks a lot!</p>