Using the default autodetect mechanism, initialize an FTPListParseEngine
object containing a raw file information for the supplied directory.
This information is obtained through the LIST command. This object
is then capable of being iterated to return a sequence of FTPFile
objects with information filled in by the
FTPFileEntryParser used.
The server may or may not expand glob expressions. You should avoid
using glob expressions because the return format for glob listings
differs from server to server and will likely cause this method to fail.
This method differs from using the listFiles() methods in that
expensive FTPFile objects are not created until needed which may be
an advantage on large lists.
FTPClient f=FTPClient();
f.connect(server);
f.login(username, password);
FTPListParseEngine engine = f.initiateListParsing(directory);
while (engine.hasNext()) {
FTPFile[] files = engine.getNext(25); // "page size" you want
//do whatever you want with these files, display them, etc.
//expensive FTPFile objects not created until needed.
}
Returns:A FTPListParseEngine object that holds the raw information and
is capable of providing parsed FTPFile objects, one for each file
containing information contained in the given path in the format
determined by the parser parameter. Null will be
returned if a data connection cannot be opened. If the current working
directory contains no files, an empty array will be the return.Throws:See Also: