title: Limiting RecursiveIteratorIterator() recursion depth
body: <p>i'm using RecursiveIteratorIterator() to explore subfolders of my current path, but in this way all trhe tree is explored, instead i want just the direct childern of my fodler to be explored for files. How can i say to RecursiveIteratorIterator() to not go much further and stop to the first subfodlers of the current folder?</p>
  
  <p>Following Lauri Lehtinen, i've tried this:</p>
  
  <pre><code>    $it = new RecursiveDirectoryIterator("$directory");
      $it-&gt;setMaxDepth(1);
  </code></pre>
  
  <p>i have PHP 5.2.3 but it say me that setMaxDepth is undefined.</p>
  
  <blockquote>
    <p>Fatal error: Call to undefined method RecursiveDirectoryIterator::setMaxDepth()</p>
  </blockquote>