The IFSFile class represents an object in the iSeries™ integrated
file system.
IFSFile
The methods on IFSFile represent operations
that are done on the object as a whole. You can use IFSFileInputStream, IFSFileOutputStream,
and IFSRandomAccessFile to read and write to the file. The IFSFile class
allows the Java™ program to do the following:
You can get the list of files in a directory
by using either the
list() method or the
listFiles() method:
- The listFiles() method caches information for each file on the initial
call. After calling listFiles(), using other methods to query file details
results in better performance because the information is retrieved from the
cache. For example, calling isDirectory() on an IFSFile object returned from
listFiles() does not require a call to the server.
- The list() method retrieves information about each file in a separate
request to the server, making it slower and more demanding of server resources.
Note: Using listFiles() means that the information in the cache may
eventually become stale, so you may need to refresh the data by calling listFiles()
again.