Patch: File.getParentFile
Tom Tromey
tromey@cygnus.com
Thu Jul 20 12:29:00 GMT 2000
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;
More information about the Java-patches
mailing list