This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
Patch: File.getParentFile
- To: Java Patch List <java-patches at sourceware dot cygnus dot com>
- Subject: Patch: File.getParentFile
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 20 Jul 2000 13:36:51 -0600
- Reply-To: tromey at cygnus dot com
I'm checking in this addition from Oskar.
2000-07-20 Tom Tromey <tromey@cygnus.com>
* java/io/File.java (getParentFile): New method, from Classpath
via Oskar Liljeblad.
Tom
Index: java/io/File.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/io/File.java,v
retrieving revision 1.10
diff -u -r1.10 File.java
--- File.java 2000/06/28 12:24:10 1.10
+++ File.java 2000/07/20 19:28:45
@@ -119,6 +119,12 @@
return path.substring(0, last);
}
+ public File getParentFile ()
+ {
+ String parent = getParent ();
+ return (parent == null ? null : new File (parent));
+ }
+
public String getPath ()
{
return path;