title: Getting canonical path from Path in Java
body: <p>I have a <code>Path</code> object, but it appears it does not have a <code>getCanonicalPath()</code> method like in the <code>File</code> class. Reason is I have dots in the Path that I want to eliminate to get something "unique": </p>
  
  <pre><code>/some/path/./something 
  # should be
  /some/path/something
  </code></pre>