Using a programmer specified
FTPFileListParser
, obtain a list of file information for a directory or information for just a single file. This information is obtained through the LIST command. The contents of the returned array is determined by the
FTPFileListParser
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.
@param parser The FTPFileListParser
that should beused to parse the server file listing.
@param pathname The file or directory to list.
@return The list of file information contained in the given path inthe format determined by the parser
parameter.
@exception FTPConnectionClosedException If the FTP server prematurely closes the connection as a result of the client being idle or some other reason causing the server to send FTP reply code 421. This exception may be caught either as an IOException or independently as itself.
@exception IOException If an I/O error occurs while either sending acommand to the server or receiving a reply from the server.