java.io
Class File
java.lang.Object
java.io.File
- All Implemented Interfaces:
- Comparable, Serializable
- Direct Known Subclasses:
- Destination
- public class File
- extends Object
- implements Serializable, Comparable
|
Method Summary |
boolean |
canExecute()
|
boolean |
canRead()
|
boolean |
canWrite()
|
private static boolean |
checkAndCreate(String,
SecurityManager)
|
int |
compareTo(File)
|
int |
compareTo(Object)
|
boolean |
createNewFile()
|
static File |
createTempFile(String,
String)
|
static File |
createTempFile(String,
String,
File)
|
boolean |
delete()
|
void |
deleteOnExit()
|
boolean |
equals(Object)
|
boolean |
exists()
|
private static File |
generateFile(String,
String,
File)
|
File |
getAbsoluteFile()
|
String |
getAbsolutePath()
|
File |
getCanonicalFile()
|
String |
getCanonicalPath()
|
long |
getFreeSpace()
|
String |
getName()
|
String |
getParent()
|
File |
getParentFile()
|
String |
getPath()
|
(package private) int |
getPrefixLength()
|
private static String |
getTempDir()
|
long |
getTotalSpace()
|
long |
getUsableSpace()
|
int |
hashCode()
|
boolean |
isAbsolute()
|
boolean |
isDirectory()
|
boolean |
isFile()
|
boolean |
isHidden()
|
long |
lastModified()
|
long |
length()
|
String[] |
list()
|
String[] |
list(FilenameFilter)
|
File[] |
listFiles()
|
File[] |
listFiles(FileFilter)
|
File[] |
listFiles(FilenameFilter)
|
static File[] |
listRoots()
|
boolean |
mkdir()
|
boolean |
mkdirs()
|
private void |
readObject(ObjectInputStream)
|
boolean |
renameTo(File)
|
boolean |
setExecutable(boolean)
|
boolean |
setExecutable(boolean,
boolean)
|
boolean |
setLastModified(long)
|
boolean |
setReadable(boolean)
|
boolean |
setReadable(boolean,
boolean)
|
boolean |
setReadOnly()
|
boolean |
setWritable(boolean)
|
boolean |
setWritable(boolean,
boolean)
|
private static String |
slashify(String,
boolean)
|
String |
toString()
|
URI |
toURI()
|
URL |
toURL()
|
private void |
writeObject(ObjectOutputStream)
|
counter
private static int counter
pathSeparator
public static final String pathSeparator
separator
public static final String separator
serialVersionUID
private static final long serialVersionUID
tmpdir
private static String tmpdir
tmpFileLock
private static final Object tmpFileLock
prefixLength
private transient int prefixLength
pathSeparatorChar
public static final char pathSeparatorChar
separatorChar
public static final char separatorChar
path
private String path
fs
private static FileSystem fs
File
private File(String,
int)
File
private File(String,
File)
File
public File(String)
File
public File(String,
String)
File
public File(File,
String)
File
public File(URI)
getPrefixLength
int getPrefixLength()
getName
public String getName()
getParent
public String getParent()
getParentFile
public File getParentFile()
getPath
public String getPath()
isAbsolute
public boolean isAbsolute()
getAbsolutePath
public String getAbsolutePath()
getAbsoluteFile
public File getAbsoluteFile()
getCanonicalPath
public String getCanonicalPath()
throws IOException
- Throws:
IOException
getCanonicalFile
public File getCanonicalFile()
throws IOException
- Throws:
IOException
slashify
private static String slashify(String,
boolean)
toURL
public URL toURL()
throws MalformedURLException
- Throws:
MalformedURLException
toURI
public URI toURI()
canRead
public boolean canRead()
canWrite
public boolean canWrite()
exists
public boolean exists()
isDirectory
public boolean isDirectory()
isFile
public boolean isFile()
isHidden
public boolean isHidden()
lastModified
public long lastModified()
length
public long length()
createNewFile
public boolean createNewFile()
throws IOException
- Throws:
IOException
delete
public boolean delete()
deleteOnExit
public void deleteOnExit()
list
public String[] list()
list
public String[] list(FilenameFilter)
listFiles
public File[] listFiles()
listFiles
public File[] listFiles(FilenameFilter)
listFiles
public File[] listFiles(FileFilter)
mkdir
public boolean mkdir()
mkdirs
public boolean mkdirs()
renameTo
public boolean renameTo(File)
setLastModified
public boolean setLastModified(long)
setReadOnly
public boolean setReadOnly()
setWritable
public boolean setWritable(boolean,
boolean)
setWritable
public boolean setWritable(boolean)
setReadable
public boolean setReadable(boolean,
boolean)
setReadable
public boolean setReadable(boolean)
setExecutable
public boolean setExecutable(boolean,
boolean)
setExecutable
public boolean setExecutable(boolean)
canExecute
public boolean canExecute()
listRoots
public static File[] listRoots()
getTotalSpace
public long getTotalSpace()
getFreeSpace
public long getFreeSpace()
getUsableSpace
public long getUsableSpace()
generateFile
private static File generateFile(String,
String,
File)
throws IOException
- Throws:
IOException
getTempDir
private static String getTempDir()
checkAndCreate
private static boolean checkAndCreate(String,
SecurityManager)
throws IOException
- Throws:
IOException
createTempFile
public static File createTempFile(String,
String,
File)
throws IOException
- Throws:
IOException
createTempFile
public static File createTempFile(String,
String)
throws IOException
- Throws:
IOException
compareTo
public int compareTo(File)
equals
public boolean equals(Object)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
writeObject
private void writeObject(ObjectOutputStream)
throws IOException
- Throws:
IOException
readObject
private void readObject(ObjectInputStream)
throws IOException,
ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
compareTo
public volatile int compareTo(Object)
- Specified by:
compareTo in interface Comparable
JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.