title: Why does Path class allow file within a file?
body: <p>I'm playing around with the NIO Path stuff, and came across this quesion:</p>
  
  <p>What will the following code fragment print?</p>
  
  <pre><code>Path p1 = Paths.get("\\personal\\readme.txt");
  Path p2 = Paths.get("\\index.html");
  Path p3 = p1.relativize(p2);
  System.out.println(p3);
  </code></pre>
  
  <p>The answer is </p>
  
  <pre><code>..\..\index.html
  </code></pre>
  
  <p>But this would make the entire Path:
  \personal\readme.txt\index.html</p>
  
  <p>This looks like nonsense to me, as you can't put a file within a file like this.  Can you?</p>
  
  <p>If readme.txt were a directory instead of a file, I would be perfectly OK with this, but I'm very confused as to why it allows a filepath like this to exist?</p>
  
  <p>Or is there some weird way that you can actually do this?</p>