Home | Trees | Index | Help |
|
---|
Package twisted :: Package protocols :: Module ftp :: Class FTPFileListProtocol |
|
BaseProtocol
--+ |Protocol
--+ |LineReceiver
--+ | FTPFileListProtocol
Parser for standard FTP file listings
This is the evil required to match:-rw-r--r-- 1 root other 531 Jan 29 03:26 README
If you need different evil for a wacky FTP server, you can override this.
It populates the instance attribute self.files, which is a list containing dicts with the following keys (examples from the above line):Method Summary | |
---|---|
__init__(self)
| |
Override this for when each line is received. | |
Inherited from LineReceiver | |
Clear buffered data. | |
Protocol.dataReceived. | |
Called when the maximum line length has been reached. | |
Override this for when raw data is received. | |
Sends a line to the other end of the connection. | |
Sets the line-mode of this receiver. | |
Sets the raw mode of this receiver. | |
Inherited from Protocol | |
(Deprecated) | |
Called when the connection is shut down. | |
Inherited from BaseProtocol | |
Called when a connection is made. | |
Make a connection to a transport and a server. |
Instance Variable Summary | |
---|---|
files : list of dicts describing the files in this listing |
Class Variable Summary | |
---|---|
str |
delimiter : The line-ending delimiter to use. |
SRE_Pattern |
fileLinePattern = ^(.)(.{9})\s+\d*\s*(\S+)\s+(\S+)\s+(\d...
|
Inherited from LineReceiver | |
str |
_LineReceiver__buffer = ''
|
int |
line_mode = 1 |
int |
MAX_LENGTH : The maximum length of a line to allow (If a sent line is longer than
this, the connection is dropped). |
Inherited from Protocol | |
tuple |
__implements__ = (<class twisted.internet.interfaces.IPr...
|
Inherited from BaseProtocol | |
int |
connected = 0 |
NoneType |
transport = None |
Method Details |
---|
lineReceived(self, line)Override this for when each line is received.
|
Instance Variable Details |
---|
fileslist of dicts describing the files in this listing |
Class Variable Details |
---|
delimiterThe line-ending delimiter to use. By default this is '\r\n'.
|
fileLinePattern
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Wed Feb 25 07:36:42 2004 | http://epydoc.sf.net |