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`.`FTPShell``

class documentation

`class FTPShell(FTPAnonymousShell): (source)`

View In Hierarchy

An authenticated implementation of `IFTPShell`.

Method | `makeDirectory` | Create a directory.
Method | `openForWriting` | Open `path` for writing.
Method | `removeDirectory` | Remove a directory.
Method | `removeFile` | Remove a file.
Method | `rename` | Rename a file or directory.

Inherited from `FTPAnonymousShell`:

Method | `__init__` | Undocumented
Method | `access` | Determine whether access to the given path is allowed.
Method | `list` | Return the list of files at given `path`, adding `keys` stat informations if specified.
Method | `openForReading` | Open `path` for reading.
Method | `receive` | Undocumented
Method | `stat` | Retrieve information about the given path.
Instance Variable | `filesystemRoot` | The path which is considered the root of this shell.
Method | `_path` | Undocumented
Method | `_stat_directory` | Get whether the filepath is a directory
Method | `_stat_group` | Get the filepath's owner's group. If this is not implemented (say in Windows) return the string "0" since stat-ing a file in Windows seems to return `st_gid=0`.
Method | `_stat_hardlinks` | Get the number of hardlinks for the filepath - if the number of hardlinks is not yet implemented (say in Windows), just return 0 since stat-ing a file in Windows seems to return `st_nlink=0`.
Method | `_stat_modified` | Get the filepath's last modified date
Method | `_stat_owner` | Get the filepath's owner's username. If this is not implemented (say in Windows) return the string "0" since stat-ing a file in Windows seems to return `st_uid=0`.
Method | `_stat_permissions` | Get the filepath's permissions object
Method | `_stat_size` | Get the filepath's size as an int
Method | `_statNode` | Shortcut method to get stat info on a node.

def makeDirectory(self, path): (source)
from `twisted.protocols.ftp.IFTPShell`
overrides `twisted.protocols.ftp.FTPAnonymousShell.makeDirectory`

Create a directory.

Parameters
path:`list` of `unicode` | The path, as a list of segments, to create
Returns
A Deferred which fires when the directory has been created, or which fails if the directory cannot be created.

def openForWriting(self, path): (source)
from `twisted.protocols.ftp.IFTPShell`
overrides `twisted.protocols.ftp.FTPAnonymousShell.openForWriting`

Open `path` for writing.

Parameters
path:`list` of `unicode` | The path, as a list of segments, to open.
Returns
A `Deferred` is returned that will fire with an object implementing `IWriteFile` if the file is successfully opened. If `path` is a directory, or if an exception is raised while trying to open the file, the `Deferred` will fire with an error.

def removeDirectory(self, path): (source)
from `twisted.protocols.ftp.IFTPShell`
overrides `twisted.protocols.ftp.FTPAnonymousShell.removeDirectory`

Remove a directory.

Parameters
path:`list` of `unicode` | The path, as a list of segments, to remove
Returns
A Deferred which fires when the directory has been removed, or which fails if the directory cannot be removed.

def removeFile(self, path): (source)
from `twisted.protocols.ftp.IFTPShell`
overrides `twisted.protocols.ftp.FTPAnonymousShell.removeFile`

Remove a file.

Parameters
path:`list` of `unicode` | The path, as a list of segments, to remove
Returns
A Deferred which fires when the file has been removed, or which fails if the file cannot be removed.

def rename(self, fromPath, toPath): (source)
from `twisted.protocols.ftp.IFTPShell`
overrides `twisted.protocols.ftp.FTPAnonymousShell.rename`

Rename a file or directory.

Parameters
fromPath:`list` of `unicode` | The current name of the path.
toPath:`list` of `unicode` | The desired new name of the path.
Returns
A Deferred which fires when the path has been renamed, or which fails if the path cannot be renamed.