title: Get the most recent file
body: <p>Using</p>
  
  <pre><code>DirectoryStream&lt;Path&gt; stream = Files.newDirectoryStream(dir,pattern);
  </code></pre>
  
  <p>I get a <code>DirectoryStream</code> of files in my <code>dir</code> which match <code>pattern</code>. But I'm not interested in all those files. I only want to get the most recent one and I know that the filename of the most recent one is the largest filename in terms of lexicographical order (because the timestamp is included). What is the easiest way to get this file? Is it always the one which comes last in my stream? What would you do?</p>