title: Get file case-sensitive name, with case-insensitive spelling
body: <p>I am making an application where the user picks a file from:</p>
  
  <p><code>FilePicker.PickFile(filename)</code></p>
  
  <p>where <code>filename</code> is a string.</p>
  
  <p>In the method, it will translate into:</p>
  
  <p><code>File file = new File(filename);</code></p>
  
  <p>and nothing is wrong with that. Next, I do,</p>
  
  <pre><code>if(file.exists()){
      System.out.println(file.getName());
  }
  else{
      System.out.println("Fail.");
  }
  </code></pre>
  
  <p>and this is where the problem begins. I want to get the name of the file, say "HELLO.txt," but if <code>filename</code> is "hello.txt," it still passes the <code>file.exists()</code> check, and <code>file.getName()</code> returns as "hello.txt," not "HELLO.txt". Is there a way, to return <code>file.getName()</code> as the case-sensitive version as "HELLO.txt?" Thanks!</p>
  
  <p><strong>An example:</strong></p>
  
  <p><code>HELLO.txt is the real file</code></p>
  
  <p><code>FilePicker.PickFile("hello.txt");</code></p>
  
  <p><strong>OUTPUT:</strong></p>
  
  <p><code>hello.txt</code></p>