diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-28 13:07:46 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-28 13:07:46 +0000 |
commit | 2c5d10f092de965351e006e624e3245fbcc6ad6e (patch) | |
tree | bef34f4b573bf6125d7f8d8f5c575c2d3c552a4a /libjava/java/io/File.java | |
parent | cf9fae4e382d011be8645b36e91d2d529c3b658c (diff) | |
download | ppe42-gcc-2c5d10f092de965351e006e624e3245fbcc6ad6e.tar.gz ppe42-gcc-2c5d10f092de965351e006e624e3245fbcc6ad6e.zip |
2003-03-28 Michael Koch <konqueror@gmx.de>
* java/io/File.java:
Import needed classes instead of whole packages, merged class
documentation with classpath, moved constants and variables to top of
class.
* java/io/PrintStream.java:
Merged class documentation with classpath, moved constants and
variables to top of class.
* java/io/RandomAccessFile.java
(RandomAccessFile): Merged with classpath.
(read): Merged with classpath).
(read*): Reformatted.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64974 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/io/File.java')
-rw-r--r-- | libjava/java/io/File.java | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/libjava/java/io/File.java b/libjava/java/io/File.java index eb457b37000..61dedff98f9 100644 --- a/libjava/java/io/File.java +++ b/libjava/java/io/File.java @@ -38,22 +38,49 @@ exception statement from your version. */ package java.io; -import java.util.*; -import java.net.*; +import java.net.MalformedURLException; +import java.net.URL; import gnu.gcj.runtime.FileDeleter; -/** - * @author Tom Tromey <tromey@cygnus.com> - * @date September 24, 1998 - */ - /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * Status: Complete to version 1.3. */ +/** + * This class represents a file or directory on a local disk. It provides + * facilities for dealing with a variety of systems that use various + * types of path separators ("/" versus "\", for example). It also + * contains method useful for creating and deleting files and directories. + * + * @author Aaron M. Renn <arenn@urbanophile.com> + * @author Tom Tromey <tromey@cygnus.com> + */ public class File implements Serializable, Comparable { + private static final long serialVersionUID = 301077366599181567L; + + // QUERY arguments to access function. + private final static int READ = 0; + private final static int WRITE = 1; + private final static int EXISTS = 2; + + // QUERY arguments to stat function. + private final static int DIRECTORY = 0; + private final static int ISFILE = 1; + private final static int ISHIDDEN = 2; + + // QUERY arguments to attr function. + private final static int MODIFIED = 0; + private final static int LENGTH = 1; + + private final native long attr (int query); + // On OSF1 V5.0, `stat' is a macro. It is easiest to use the name + // `_stat' instead. We do the same thing for `_access' just in + // case. + private final native boolean _access (int query); + private final native boolean _stat (int query); + public boolean canRead () { checkRead(); @@ -612,26 +639,4 @@ public class File implements Serializable, Comparable path = path.replace (oldSeparatorChar, separatorChar); } - // QUERY arguments to access function. - private final static int READ = 0; - private final static int WRITE = 1; - private final static int EXISTS = 2; - - // QUERY arguments to stat function. - private final static int DIRECTORY = 0; - private final static int ISFILE = 1; - private final static int ISHIDDEN = 2; - - // QUERY arguments to attr function. - private final static int MODIFIED = 0; - private final static int LENGTH = 1; - - private final native long attr (int query); - // On OSF1 V5.0, `stat' is a macro. It is easiest to use the name - // `_stat' instead. We do the same thing for `_access' just in - // case. - private final native boolean _access (int query); - private final native boolean _stat (int query); - - private static final long serialVersionUID = 301077366599181567L; } |