This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: File.getParentFile


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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]