title: How to replace File.listFiles(FileFilter filter) with nio in Java 7?
body: <p>I have some file I/0 traversal code written in Java 6, trying to move it the New I/O in Java 7 but I cannot find any replacement for this kind of stuff.</p>
  
  <pre><code>File[] files = dir.listFiles(AudioFileFilter.getInstance());
  </code></pre>
  
  <p>Namely, no way to filter paths only files, and it returns list of files so I would then have to convert each file to path (file.toPath) if I wanted to limit the use of File in methods it calls, which seems rather laborious.</p>
  
  <p>I did look at FileVisitor but this does not seem to allow you to control how the the tree is traversed so I don' think it will work for me.</p>
  
  <p>So how much of a replacement is Path for File in Java 7 ?</p>