Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`protocols`.`ftp`.`FTPClientBasic``

class documentation

`class FTPClientBasic(basic.LineReceiver): (source)`

Known subclasses: `twisted.protocols.ftp.FTPClient`

View In Hierarchy

Foundations of an FTP client.

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

Inherited from `LineReceiver`:

Method | `clearLineBuffer` | Clear buffered data.
Method | `dataReceived` | Protocol.dataReceived. Translates bytes into lines, and calls lineReceived (or rawDataReceived, depending on mode.)
Method | `lineLengthExceeded` | Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way.
Method | `rawDataReceived` | Override this for when raw data is received.
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.
Constant | `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.
Class Variable | `delimiter` | The line-ending delimiter to use. By default this is `b'\r\n'`.
Instance Variable | `line_mode` | Undocumented
Instance Variable | `_buffer` | Undocumented
Instance Variable | `_busyReceiving` | Undocumented

Inherited from `Protocol` (via `LineReceiver`):

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

Inherited from `BaseProtocol` (via `LineReceiver`, `Protocol`):

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

Inherited from `_PauseableMixin` (via `LineReceiver`, `Protocol`, `BaseProtocol`):

Method | `pauseProducing` | Undocumented
Method | `resumeProducing` | Undocumented
Method | `stopProducing` | Undocumented
Instance Variable | `paused` | Undocumented

def __init__(self): (source)
overridden in `twisted.protocols.ftp.FTPClient`

Undocumented

def connectionLost(self, reason): (source)
from `twisted.internet.interfaces.IProtocol`
overrides `twisted.internet.protocol.Protocol.connectionLost`

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.

Parameters
reason:`twisted.python.failure.Failure` | Undocumented

def fail(self, error): (source)
overridden in `twisted.protocols.ftp.FTPClient`

Give an error to any queued deferreds.

def lineReceived(self, line): (source)
overrides `twisted.protocols.basic.LineReceiver.lineReceived`

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

def popCommandQueue(self): (source)

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

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.

Parameters
ftpCommand | an `FTPCommand`

def queueLogin(self, username, password): (source)
overridden in `twisted.protocols.ftp.FTPClient`

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 queueStringCommand(self, command, public=1): (source)

Queues a string to be issued as an FTP command

Parameters
command | string of an FTP command to queue
public | a flag intended for internal use by FTPClient. Don't change it unless you know what you're doing.
Returns
a `Deferred` that will be called when the response to the command has been received.

def sendLine(self, line): (source)
overrides `twisted.protocols.basic.LineReceiver.sendLine`

Sends a line, unless line is None.

Parameters
line:`bytes` or `unicode` | Line to send

def sendNextCommand(self): (source)

(Private) Processes the next command in the queue.

debug: `bool` = (source)

Undocumented

actionQueue: `list` = (source)

Undocumented

greeting = (source)

Undocumented

nextDeferred = (source)

Undocumented

response: `list` = (source)

Undocumented

def _cb_greeting(self, greeting): (source)

Undocumented

def _fail(self, error): (source)

Errback all queued deferreds.

_encoding: `str` = (source)

Undocumented

_failed: `int` = (source)

Undocumented