Class t.p.f.FTP(object, basic.LineReceiver, policies.TimeoutMixin):

Part of twisted.protocols.ftp View Source View In Hierarchy

Protocol Interpreter for the File Transfer Protocol
Instance VariablesstateThe current server state. One of UNAUTH, INAUTH, AUTHED, RENAMING.
shellThe connected avatar
binaryThe transfer mode. If false, ASCII.
dtpFactoryGenerates a single DTP for this session
dtpPortPort returned from listenTCP
listenFactoryA callable with the signature of twisted.internet.interfaces.IReactorTCP.listenTCP which will be used to create Ports for passive connections (mainly for testing).
passivePortRangeiterator used as source of passive port numbers. (type: iterator )

Split Table into Classes Show Methods in One Table

Line # Kind Name Docs
641 Method reply Undocumented
646 Method connectionMade Called when a connection is made.
651 Method connectionLost Called when the connection is shut down.
663 Method timeoutConnection Called when the connection times out.
666 Method lineReceived Override this for when each line is received.
709 Method processCommand Undocumented
739 Method getDTPPort Return a port for passive access, using self.passivePortRange
756 Method ftp_USER First part of login. Get the username the peer wants to
774 Method ftp_PASS Second part of login. Get the password the peer wants to
807 Method ftp_PASV Request for a passive connection
833 Method ftp_PORT Undocumented
854 Method ftp_LIST This command causes a list to be sent from the server to the
900 Method ftp_NLST Undocumented
938 Method ftp_CWD Undocumented
952 Method ftp_CDUP Undocumented
956 Method ftp_PWD Undocumented
960 Method ftp_RETR Undocumented
1020 Method ftp_STOR Undocumented
1083 Method ftp_SIZE Undocumented
1095 Method ftp_MDTM Undocumented
1107 Method ftp_TYPE Undocumented
1116 Method type_A Undocumented
1123 Method type_I Undocumented
1130 Method type_UNKNOWN Undocumented
1135 Method ftp_SYST Undocumented
1139 Method ftp_STRU Undocumented
1146 Method ftp_MODE Undocumented
1153 Method ftp_MKD Undocumented
1161 Method ftp_RMD Undocumented
1169 Method ftp_DELE Undocumented
1177 Method ftp_NOOP Undocumented
1181 Method ftp_RNFR Undocumented
1187 Method ftp_RNTO Undocumented
1200 Method ftp_QUIT Undocumented
1206 Method cleanupDTP call when DTP connection exits

Inherited from LineReceiver:

Line # Kind Name Docs
207 Method clearLineBuffer Clear buffered data.
211 Method dataReceived Protocol.dataReceived.
241 Method setLineMode Sets the line-mode of this receiver.
256 Method setRawMode Sets the raw mode of this receiver.
263 Method rawDataReceived Override this for when raw data is received.
273 Method sendLine Sends a line to the other end of the connection.
278 Method lineLengthExceeded Called when the maximum line length has been reached.

Inherited from BaseProtocol (via LineReceiver, Protocol):

Line # Kind Name Docs
341 Method makeConnection Make a connection to a transport and a server.

Inherited from _PauseableMixin (via LineReceiver):

Line # Kind Name Docs
172 Method pauseProducing Undocumented
176 Method resumeProducing Undocumented
181 Method stopProducing Undocumented

Inherited from TimeoutMixin:

Line # Kind Name Docs
593 Method callLater Undocumented
597 Method resetTimeout Reset the timeout count down
602 Method setTimeout Change the timeout period
623 Method __timedOut Undocumented
Line # Kind Name Docs
593 Method callLater Undocumented
1206 Method cleanupDTP call when DTP connection exits
207 Method clearLineBuffer Clear buffered data.
651 Method connectionLost Called when the connection is shut down.
646 Method connectionMade Called when a connection is made.
211 Method dataReceived Protocol.dataReceived.
952 Method ftp_CDUP Undocumented
938 Method ftp_CWD Undocumented
1169 Method ftp_DELE Undocumented
854 Method ftp_LIST This command causes a list to be sent from the server to the
1095 Method ftp_MDTM Undocumented
1153 Method ftp_MKD Undocumented
1146 Method ftp_MODE Undocumented
900 Method ftp_NLST Undocumented
1177 Method ftp_NOOP Undocumented
774 Method ftp_PASS Second part of login. Get the password the peer wants to
807 Method ftp_PASV Request for a passive connection
833 Method ftp_PORT Undocumented
956 Method ftp_PWD Undocumented
1200 Method ftp_QUIT Undocumented
960 Method ftp_RETR Undocumented
1161 Method ftp_RMD Undocumented
1181 Method ftp_RNFR Undocumented
1187 Method ftp_RNTO Undocumented
1083 Method ftp_SIZE Undocumented
1020 Method ftp_STOR Undocumented
1139 Method ftp_STRU Undocumented
1135 Method ftp_SYST Undocumented
1107 Method ftp_TYPE Undocumented
756 Method ftp_USER First part of login. Get the username the peer wants to
739 Method getDTPPort Return a port for passive access, using self.passivePortRange
278 Method lineLengthExceeded Called when the maximum line length has been reached.
666 Method lineReceived Override this for when each line is received.
341 Method makeConnection Make a connection to a transport and a server.
172 Method pauseProducing Undocumented
709 Method processCommand Undocumented
263 Method rawDataReceived Override this for when raw data is received.
641 Method reply Undocumented
597 Method resetTimeout Reset the timeout count down
176 Method resumeProducing Undocumented
273 Method sendLine Sends a line to the other end of the connection.
241 Method setLineMode Sets the line-mode of this receiver.
256 Method setRawMode Sets the raw mode of this receiver.
602 Method setTimeout Change the timeout period
181 Method stopProducing Undocumented
663 Method timeoutConnection Called when the connection times out.
1116 Method type_A Undocumented
1123 Method type_I Undocumented
1130 Method type_UNKNOWN Undocumented
623 Method __timedOut Undocumented
def reply(self, key, *args): (source)
Undocumented
def connectionMade(self): (source)

Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
def connectionLost(self, reason): (source)

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.
Parametersreason (type: twisted.python.failure.Failure )
def timeoutConnection(self): (source)
Called when the connection times out. Override to define behavior other than dropping the connection.
def lineReceived(self, line): (source)
Override this for when each line is received.
def processCommand(self, cmd, *params): (source)
Undocumented
def getDTPPort(self, factory): (source)
Return a port for passive access, using self.passivePortRange attribute.
def ftp_USER(self, username): (source)
First part of login. Get the username the peer wants to authenticate as.
def ftp_PASS(self, password): (source)
Second part of login. Get the password the peer wants to authenticate with.
def ftp_PASV(self): (source)

Request for a passive connection

from the rfc:
   This command requests the server-DTP to "listen" on a data port
   (which is not its default data port) and to wait for a connection
   rather than initiate one upon receipt of a transfer command.  The
   response to this command includes the host and port address this
   server is listening on.
def ftp_PORT(self, address): (source)
Undocumented
def ftp_LIST(self, path=''): (source)
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.
def ftp_NLST(self, path): (source)
Undocumented
def ftp_CWD(self, path): (source)
Undocumented
def ftp_CDUP(self): (source)
Undocumented
def ftp_PWD(self): (source)
Undocumented
def ftp_RETR(self, path): (source)
Undocumented
def ftp_STOR(self, path): (source)
Undocumented
def ftp_SIZE(self, path): (source)
Undocumented
def ftp_MDTM(self, path): (source)
Undocumented
def ftp_TYPE(self, type): (source)
Undocumented
def type_A(self, code): (source)
Undocumented
def type_I(self, code): (source)
Undocumented
def type_UNKNOWN(self, code): (source)
Undocumented
def ftp_SYST(self): (source)
Undocumented
def ftp_STRU(self, structure): (source)
Undocumented
def ftp_MODE(self, mode): (source)
Undocumented
def ftp_MKD(self, path): (source)
Undocumented
def ftp_RMD(self, path): (source)
Undocumented
def ftp_DELE(self, path): (source)
Undocumented
def ftp_NOOP(self): (source)
Undocumented
def ftp_RNFR(self, fromName): (source)
Undocumented
def ftp_RNTO(self, toName): (source)
Undocumented
def ftp_QUIT(self): (source)
Undocumented
def cleanupDTP(self): (source)
call when DTP connection exits
API Documentation for Twisted, generated by pydoctor at 2008-10-26 16:12:37.