twisted.protocols.ftp.FTP.ftp_NLST(self, path)
method documentationtwisted.protocols.ftp.FTP
View Source
This command causes a directory listing to be sent from the server to the client. The pathname should specify a directory or other system-specific file group descriptor. An empty path implies the current working directory. If the path is non-existent, send nothing. If the path is to a file, send only the file name.
Parameters | path | The path for which a directory listing should be returned. (type: str ) |
Returns | a Deferred which will be fired when the listing request is finished. (type: Deferred ) |
Function | cbList | Send, line by line, each matching file in the directory listing, and then close the connection. |
Function | listErr | RFC 959 specifies that an NLST request may only return directory listings. Thus, send nothing and just close the connection. |
Send, line by line, each matching file in the directory listing, and then close the connection.
Parameters | results | The names of the files in the directory. (type: A list of tuple . The first element of each tuple is a str and the second element is a list .) |
glob | A shell-style glob through which to filter results (see http://docs.python.org/2/library/fnmatch.html), or None for no filtering. (type: str or None ) | |
Returns | A tuple containing the status code for a successful transfer. (type: tuple ) |
RFC 959 specifies that an NLST request may only return directory listings. Thus, send nothing and just close the connection.
Parameters | results | The Failure wrapping a FileNotFoundError that occurred while trying to list the contents of a nonexistent directory. (type: Failure ) |
Returns | A tuple containing the status code for a successful transfer. (type: tuple ) |