title: java.io.File.listFiles vs java.nio.Files.list and its thrown IOException
body: <p>Why does <code>Files.list</code> throw an <code>IOException</code> whereas <code>File.listFiles</code> doesn't?</p>
  
  <p>Looking at the source code of <code>Files.list</code> (Java 8) I am even more curious why there wasn't thrown an <code>UncheckedIOException</code> as it is also thrown inside the iterator.</p>
  
  <p>If I replace <code>File.listFiles</code>-code with <code>Files.list</code> I now need to handle an exception where I didn't really handle one before. 
  Needless to say, that most developer don't even know what they would have to handle at that point ;-) or just put a <code>// TODO</code> and/or <code>e.printStackTrace()</code> there. </p>
  
  <p>That makes the use of the <code>Stream</code> here rather cumbersome as you need to surround it with a <code>try/catch</code> or rethrow the exception, which might not even be possible in legacy code.</p>
  
  <p>So why was this decision taken?</p>