class documentation

class twisted.protocols.ftp.FTPClientBasic(basic.LineReceiver): (source)

Known subclasses: twisted.protocols.ftp.FTPClient

View In Hierarchy

Foundations of an FTP client.

Class Variable debug Undocumented
Method __init__ Undocumented
Instance Variable actionQueue Undocumented
Instance Variable greeting Undocumented
Instance Variable nextDeferred Undocumented
Instance Variable response Undocumented
Method fail Give an error to any queued deferreds.
Method sendLine Sends a line, unless line is None.
Method sendNextCommand (Private) Processes the next command in the queue.
Method queueCommand Add an FTPCommand object to the queue.
Method queueStringCommand Queues a string to be issued as an FTP command
Method popCommandQueue Return the front element of the command queue, or None if empty.
Method queueLogin Login: send the username, send the password.
Method lineReceived (Private) Parses the response messages from the FTP server.
Method connectionLost Called when the connection is shut down.
Class Variable _encoding Undocumented
Instance Variable _failed Undocumented
Method _fail Errback all queued deferreds.
Method _cb_greeting Undocumented

Inherited from LineReceiver:

Class Variable delimiter The line-ending delimiter to use. By default this is b'\r\n'.
Class Variable MAX_LENGTH The maximum length of a line to allow (If a sent line is longer than this, the connection is dropped). Default is 16384.
Instance Variable line_mode Undocumented
Method clearLineBuffer Clear buffered data.
Method dataReceived Protocol.dataReceived. Translates bytes into lines, and calls lineReceived (or rawDataReceived, depending on mode.)
Method setLineMode Sets the line-mode of this receiver.
Method setRawMode Sets the raw mode of this receiver. Further data received will be sent to rawDataReceived rather than lineReceived.
Method rawDataReceived Override this for when raw data is received.
Method lineLengthExceeded Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way.
Instance Variable _buffer Undocumented
Instance Variable _busyReceiving Undocumented

Inherited from Protocol (via LineReceiver):

Class Variable factory Undocumented
Method logPrefix Return a prefix matching the class name, to identify log messages related to this protocol instance.

Inherited from BaseProtocol (via LineReceiver, Protocol):

Instance Variable connected Undocumented
Instance Variable transport Undocumented
Method makeConnection Make a connection to a transport and a server.
Method connectionMade Called when a connection is made.

Inherited from _PauseableMixin (via LineReceiver):

Instance Variable paused Undocumented
Method pauseProducing Undocumented
Method resumeProducing Undocumented
Method stopProducing Undocumented
debug = (source)

Undocumented

(type: bool)
_encoding = (source)

Undocumented

(type: str)
def __init__(self): (source)

Undocumented

actionQueue = (source)

Undocumented

(type: list)
greeting = (source)

Undocumented

nextDeferred = (source)

Undocumented

response = (source)

Undocumented

(type: list)
_failed = (source)

Undocumented

(type: int)
def fail(self, error): (source)

Give an error to any queued deferreds.

def _fail(self, error): (source)

Errback all queued deferreds.

def _cb_greeting(self, greeting): (source)

Undocumented

def sendLine(self, line): (source)

Sends a line, unless line is None.

ParameterslineLine to send (type: bytes or unicode)
def sendNextCommand(self): (source)

(Private) Processes the next command in the queue.

def queueCommand(self, ftpCommand): (source)

Add an FTPCommand object to the queue.

If it's the only thing in the queue, and we are connected and we aren't waiting for a response of an earlier command, the command will be sent immediately.

ParametersftpCommandan FTPCommand
def queueStringCommand(self, command, public=1): (source)

Queues a string to be issued as an FTP command

Parameterscommandstring of an FTP command to queue
publica flag intended for internal use by FTPClient. Don't change it unless you know what you're doing.
Returnsa Deferred that will be called when the response to the command has been received.
def popCommandQueue(self): (source)

Return the front element of the command queue, or None if empty.

def queueLogin(self, username, password): (source)

Login: send the username, send the password.

If the password is None, the PASS command won't be sent. Also, if the response to the USER command has a response code of 230 (User logged in), then PASS won't be sent either.

def lineReceived(self, line): (source)

(Private) Parses the response messages from the FTP server.

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.

ParametersreasonUndocumented (type: twisted.python.failure.Failure)
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.