title: How do I get a file's directory using the File object?
body: <p>Consider the code:</p>
  
  <pre><code>File file = new File("c:\\temp\\java\\testfile");
  </code></pre>
  
  <p><code>testfile</code> is a file, and it may or may not exist.
  I want to get the directory <code>c:\\temp\\java\\</code> using the <code>File</code> object.  How do I go about doing this?</p>