File.java (getParentFile): New method, from Classpath via Oskar Liljeblad.

* java/io/File.java (getParentFile): New method, from Classpath
	via Oskar Liljeblad.

From-SVN: r35149
This commit is contained in:
Tom Tromey 2000-07-20 19:29:14 +00:00 committed by Tom Tromey
parent 75723df4d3
commit 373d3b1863
2 changed files with 9 additions and 0 deletions

View 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>

View 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;