Home | Trees | Indices | Help |
---|
|
object --+ | sftp.BaseSFTP --+ | object --+ | | | threading._Verbose --+ | | | threading.Thread --+ | | | server.SubsystemHandler --+ | SFTPServer
Server-side SFTP subsystem support. Since this is a `.SubsystemHandler`, it can be (and is meant to be) set as the handler for ``"sftp"`` requests. Use `.Transport.set_subsystem_handler` to activate this class.
Instance Methods | |||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
Static Methods | |||
|
|||
|
Properties | |
Inherited from Inherited from |
Method Details |
The constructor for SFTPServer is meant to be called from within the `.Transport` as a subsystem handler. ``server`` and any additional parameters or keyword parameters are passed from the original call to `.Transport.set_subsystem_handler`. :param .Channel channel: channel passed from the `.Transport`. :param str name: name of the requested subsystem. :param .ServerInterface server: the server object associated with this channel and subsystem :param class sftp_si: a subclass of `.SFTPServerInterface` to use for handling individual requests.
|
Process an ssh subsystem in server mode. This method is called on a new object (and in a new thread) for each subsystem request. It is assumed that all subsystem logic will take place here, and when the subsystem is finished, this method will return. After this method returns, the channel is closed. The combination of ``transport`` and ``channel`` are unique; this handler corresponds to exactly one `.Channel` on one `.Transport`. .. note: It is the responsibility of this method to exit if the underlying `.Transport` is closed. This can be done by checking `.Transport.is_active` or noticing an EOF on the `.Channel`. If this method loops forever without checking for this case, your Python interpreter may refuse to exit because this thread will still be running. :param str name: name of the requested subsystem. :param .Transport transport: the server-mode `.Transport`. :param .Channel channel: the channel associated with this subsystem request.
|
Perform any cleanup at the end of a subsystem. The default implementation just closes the channel. .. versionadded:: 1.1
|
Convert an errno value (as from an ``OSError`` or ``IOError``) into a standard SFTP result code. This is a convenience function for trapping exceptions in server code and returning an appropriate result. :param int e: an errno code, as from ``OSError.errno``. :return: an `int` SFTP error code like ``SFTP_NO_SUCH_FILE``. |
Change a file's attributes on the local filesystem. The contents of ``attr`` are used to change the permissions, owner, group ownership, and/or modification & access time of the file, depending on which attributes are present in ``attr``. This is meant to be a handy helper function for translating SFTP file requests into local file operations. :param str filename: name of the file to alter (should usually be an absolute path). :param .SFTPAttributes attr: attributes to change. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Aug 29 06:01:16 2014 | http://epydoc.sourceforge.net |