File.java (getParentFile): New method, from Classpath via Oskar Liljeblad.
authorTom Tromey <tromey@cygnus.com>
Thu, 20 Jul 2000 19:29:14 +0000 (19:29 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 20 Jul 2000 19:29:14 +0000 (19:29 +0000)
* java/io/File.java (getParentFile): New method, from Classpath
via Oskar Liljeblad.

From-SVN: r35149

libjava/ChangeLog
libjava/java/io/File.java

index ace91c806e04c78559e82a258648f059e79c166c..62dda8217497a74d171f36c169ab92393cde6d3f 100644 (file)
@@ -1,5 +1,8 @@
 2000-07-20  Tom Tromey  <tromey@cygnus.com>
 
+       * java/io/File.java (getParentFile): New method, from Classpath
+       via Oskar Liljeblad.
+
        * java/util/Vector.java (remove(Object)): Implemented.
 
 2000-07-19  Jeff Sturm  <jeff.sturm@appnet.com>
index c8aaddfac2a32e4e4cc554038f6a70f113930230..b9ff9ff23f21329d550684016208a4eea8b883ac 100644 (file)
@@ -119,6 +119,12 @@ public class File implements Serializable
     return path.substring(0, last);
   }
 
+  public File getParentFile ()
+  {
+    String parent = getParent ();
+    return (parent == null ? null : new File (parent));
+  }
+
   public String getPath ()
   {
     return path;