|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface File
| Method Summary | |
|---|---|
int |
compareTo(File f)
Compares two file names to see if they are identical AND belong to the same file system. |
boolean |
copyTo(File f)
|
int |
countChildren()
The number of files in the directory represented by this file. |
boolean |
createNewFile()
|
boolean |
delete()
|
boolean |
exists()
|
Object |
getAttribute(String attrib)
|
File |
getChild(String name)
If ".isDirectory() == true" then name is local name of a file in the directory, and the corresponding file will be returned. |
File[] |
getChildren()
List the files that are in the directory represented by this file. |
FileSystem |
getFS()
Gets the FileSystem object associated with this file. |
File |
getParent()
|
String |
getShortName()
|
boolean |
isDirectory()
Determine if there are "sub" files associated with this file. |
boolean |
isFile()
Determine if there is a byte stream associated with this file. |
Iterator<File> |
iterator()
List the files that are in the directory represented by this file. |
long |
length()
|
Iterator<String> |
listAttributes()
|
Iterator<File> |
listFiles()
List the files that are in the directory represented by this file. |
boolean |
mkdir()
|
boolean |
mkdirs()
|
boolean |
renameTo(File destination)
Renames a file. |
void |
setAttribute(String attrib,
Object value)
|
boolean |
setLength(long length)
|
| Method Detail |
|---|
int compareTo(File f)
compareTo in interface Comparable<File>f - File to compare to.
boolean renameTo(File destination)
throws UnsupportedOperationException
destination - File to rename this to.
UnsupportedOperationException
boolean copyTo(File f)
throws UnsupportedOperationException
UnsupportedOperationExceptionboolean createNewFile()
boolean delete()
FileSystem getFS()
boolean exists()
File getParent()
boolean isFile()
boolean isDirectory()
File getChild(String name)
name - Short name of a file in the directory represented by this file.
String getShortName()
void setAttribute(String attrib,
Object value)
throws UnsupportedOperationException,
IllegalArgumentException
UnsupportedOperationException
IllegalArgumentExceptionObject getAttribute(String attrib)
Iterator<String> listAttributes()
Iterator<File> listFiles()
Iterator<File> iterator()
iterator in interface Iterable<File>File[] getChildren()
int countChildren()
boolean mkdir()
boolean mkdirs()
long length()
boolean setLength(long length)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||