diff options
author | Tom Tromey <tromey@cygnus.com> | 2000-07-20 19:29:14 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-07-20 19:29:14 +0000 |
commit | 373d3b1863ed6433c288dd87c7892380ec1b671a (patch) | |
tree | 36d6ff30095c01a334bee360ebcf790b5ac12fe0 /libjava/java/io/File.java | |
parent | 75723df4d361ec33a1c9e76c631586895cd7daad (diff) | |
download | gcc-373d3b1863ed6433c288dd87c7892380ec1b671a.zip gcc-373d3b1863ed6433c288dd87c7892380ec1b671a.tar.gz gcc-373d3b1863ed6433c288dd87c7892380ec1b671a.tar.bz2 |
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
Diffstat (limited to 'libjava/java/io/File.java')
-rw-r--r-- | libjava/java/io/File.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java index c8aaddf..b9ff9ff 100644 --- a/libjava/java/io/File.java +++ b/libjava/java/io/File.java @@ -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; |