public final class FtpListInputStream extends FtpInputStream
client, data, stream
Constructor and Description |
---|
FtpListInputStream(FtpFile dir)
Open 'list' or 'name list' InputStream for given directory.
|
public FtpListInputStream(FtpFile dir) throws IOException
LIST - list
This command causes a list to be sent from the server to the passive DTP. If the pathname specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A null argument implies the user's current working or default directory. The data transfer is over the data connection in type ASCII. Since the information on a file may vary widely from system to system, this information may be hard to use automatically in a program, but may be quite useful to a human user.
NLST - name list
This command causes a directory listing to be sent from server to user site. The pathname should specify a directory or other system-specific file group descriptor; a null argument implies the current directory. The server will return a stream of names of files and no other information. The data will be transferred in ASCII type over the data connection as valid pathname strings separated by [CRLF] or [NL]. This command is intended to return information that can be used by a program to further process the files automatically, for example in the implementation of a "multiple get" function.
dir
- directory to be listedIOException
- socket errorFileNotFoundException
- server directory not foundWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses