Module t.p.ftp

Part of twisted.protocols View Source

An FTP protocol implementation
AuthorsItamar Shtull-Trauring
Jp Calderone

Andrew Bennetts

API stability: FTPClient is stable, FTP and FTPFactory (server) is unstable.
Class InvalidPath Undocumented
Function toSegments Normalize a path, as represented by a list of strings each
Function errnoToFailure Undocumented
Class FilesystemShellException Base for IFTPShell errors.
Class NoSuchFile Undocumented
Class PermissionDenied Undocumented
Class WrongFiletype Undocumented
Class FTPCmdError No class docstring; 1/2 methods documented
Class FileNotFoundError Undocumented
Class AnonUserDeniedError Raised when an anonymous user issues a command that will alter the
Class PermissionDeniedError Raised when access is attempted to a resource to which access is
Class IsNotADirectoryError raised when RMD is called on a path that isn't a directory
Class CmdSyntaxError Undocumented
Class CmdArgSyntaxError Undocumented
Class CmdNotImplementedError raised when an unimplemented command is given to the server
Class CmdNotImplementedForArgError Undocumented
Class FTPError Undocumented
Class FTPTimeoutError Undocumented
Class DTPError Undocumented
Class BogusClientError thrown when a client other than the one we opened this
Class PathBelowTLDError Undocumented
Class ClientDisconnectError Undocumented
Class PortConnectionError Undocumented
Class BadCmdSequenceError raised when a client sends a series of commands in an illogical sequence
Class AuthorizationError raised when client authentication fails
Function debugDeferred Undocumented
Class DTP No class docstring; 6/15 methods documented
Class DTPFactory DTP protocol factory.
Class ASCIIConsumerWrapper Undocumented
Class FileConsumer Undocumented
Class FTPOverflowProtocol FTP mini-protocol for when there are too many connections.
Class FTP Protocol Interpreter for the File Transfer Protocol
Class FTPFactory A factory for producing ftp protocol instances
Interface IFTPShell An abstraction of the shell commands used by the FTP protocol for
Interface IReadFile A file out of which bytes may be read.
Interface IWriteFile A file into which bytes may be written.
Function _getgroups Return the primary and supplementary groups for the given UID.
Function _testPermissions checks to see if uid has proper permissions to access path with mode
Class FTPAnonymousShell An anonymous implementation of IFTPShell
Class _FileReader No class docstring; 1/3 methods documented
Class FTPShell No class docstring; 4/5 methods documented
Class _FileWriter No class docstring; 1/2 methods documented
Class FTPRealm
Class ConnectionLost Undocumented
Class CommandFailed Undocumented
Class BadResponse Undocumented
Class UnexpectedResponse Undocumented
Class UnexpectedData Undocumented
Class FTPCommand Undocumented
Class ProtocolWrapper No class docstring; 3/4 methods documented
Class SenderProtocol No class docstring; 6/8 methods documented
Function decodeHostPort Decode an FTP response specifying a host and port.
Function encodeHostPort Undocumented
Function _unwrapFirstError Undocumented
Class FTPDataPortFactory Factory for data connections that use the PORT command
Class FTPClientBasic Foundations of an FTP client.
Class _PassiveConnectionFactory No class docstring; 2/3 methods documented
Class FTPClient A Twisted FTP Client
Class FTPFileListProtocol Parser for standard FTP file listings
Function parsePWDResponse Returns the path from a response to a PWD command.
def toSegments(cwd, path): (source)
Normalize a path, as represented by a list of strings each representing one segment of the path.
def errnoToFailure(e, path): (source)
Undocumented
def debugDeferred(self, *_): (source)
Undocumented
def _getgroups(uid): (source)
Return the primary and supplementary groups for the given UID.
Parametersuid(type: int )
def _testPermissions(uid, gid, spath, mode='r'): (source)
checks to see if uid has proper permissions to access path with mode
Parametersuidnumeric user id (type: int )
gidnumeric group id (type: int )
spaththe path on the server to test (type: str )
mode'r' or 'w' (read or write) (type: str )
ReturnsTrue if the given credentials have the specified form of access to the given path (type: bool )
def decodeHostPort(line): (source)
Decode an FTP response specifying a host and port.
Returnsa 2-tuple of (host, port).
def encodeHostPort(host, port): (source)
Undocumented
def _unwrapFirstError(failure): (source)
Undocumented
def parsePWDResponse(response): (source)

Returns the path from a response to a PWD command.

Responses typically look like:
   257 "/home/andrew" is current directory.

For this example, I will return '/home/andrew'.

If I can't find the path, I return None.
API Documentation for twisted, generated by pydoctor.