2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
* java/io/File.java (java.net): Imported.
(getAbsoluteFile): Added.
(getCanonicalPath): Likewise.
(toURL): Likewise.
(http://gcc.gnu.org/ml/java-patches/2001-q1/msg00208.html)
From-SVN: r39562
+2001-02-09 Alexandre Petit-Bianco <apbianco@redhat.com>
+
+ * java/io/File.java (java.net): Imported.
+ (getAbsoluteFile): Added.
+ (getCanonicalPath): Likewise.
+ (toURL): Likewise.
+
2001-02-08 Bryce McKinlay <bryce@albatross.co.nz>
* java/lang/Byte.java: Remove redundant instanceof and null checks.
package java.io;
import java.util.*;
+import java.net.*;
import gnu.gcj.runtime.FileDeleter;
/**
return System.getProperty("user.dir") + separatorChar + path;
}
+ public File getAbsoluteFile () throws IOException
+ {
+ return new File (getAbsolutePath());
+ }
+
public native String getCanonicalPath () throws IOException;
+ public File getCanonicalFile () throws IOException
+ {
+ return new File (getCanonicalPath());
+ }
+
public String getName ()
{
int last = path.lastIndexOf(separatorChar);
return path;
}
+ public URL toURL () throws MalformedURLException
+ {
+ return new URL ("file:" + path + (isDirectory() ? "/" : ""));
+ }
+
private final native boolean performMkdir ();
public boolean mkdir ()
{