You are on page 1of 1

File:

-does not operate from streams


-primary source and destination for data within many programs
*Java has methods for creating, reading, updating, and deleting files.

File Methods:
- Most are self- explanatory, excluding isFile() and isAbsolute().
- File includes two useful utility methods of special interest:
renameTo() and delete()
-Methods exist to mark files as readable, writable, and executable.
*There are more file methods that are found to be helpful

Directories: a File that contains a list of other files and directories

FilenameFilter:
-to limit the number of files returned by the list( ) method
-include only those files that match a certain filename pattern, or filter.
-FFObj:is an object of a class that implements the FilenameFilter interface

listFiles():
-a variation to the list( ) method
-return the file list as an array of File objects instead of strings
-

You might also like