Start in on the SFTP section
This commit is contained in:
parent
a529e93256
commit
333dd249b0
|
@ -26,8 +26,8 @@ class SFTPAttributes (object):
|
||||||
"""
|
"""
|
||||||
Representation of the attributes of a file (or proxied file) for SFTP in
|
Representation of the attributes of a file (or proxied file) for SFTP in
|
||||||
client or server mode. It attemps to mirror the object returned by
|
client or server mode. It attemps to mirror the object returned by
|
||||||
``os.stat`` as closely as possible, so it may have the following fields,
|
`os.stat` as closely as possible, so it may have the following fields,
|
||||||
with the same meanings as those returned by an ``os.stat`` object:
|
with the same meanings as those returned by an `os.stat` object:
|
||||||
- st_size
|
- st_size
|
||||||
- st_uid
|
- st_uid
|
||||||
- st_gid
|
- st_gid
|
||||||
|
|
|
@ -16,9 +16,6 @@
|
||||||
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
|
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
|
||||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||||
|
|
||||||
"""
|
|
||||||
Client-mode SFTP support.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
import errno
|
import errno
|
||||||
|
@ -49,12 +46,13 @@ def _to_unicode(s):
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
class SFTPClient (BaseSFTP):
|
class SFTPClient(BaseSFTP):
|
||||||
"""
|
"""
|
||||||
SFTP client object. ``SFTPClient`` is used to open an sftp session across
|
SFTP client object.
|
||||||
an open ssh `.Transport` and do remote file operations.
|
|
||||||
|
Used to open an SFTP session across an open SSH `.Transport` and perform
|
||||||
|
remote file operations.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, sock):
|
def __init__(self, sock):
|
||||||
"""
|
"""
|
||||||
Create an SFTP client from an existing `.Channel`. The channel
|
Create an SFTP client from an existing `.Channel`. The channel
|
||||||
|
@ -782,6 +780,8 @@ class SFTPClient (BaseSFTP):
|
||||||
return self._cwd + '/' + path
|
return self._cwd + '/' + path
|
||||||
|
|
||||||
|
|
||||||
class SFTP (SFTPClient):
|
class SFTP(SFTPClient):
|
||||||
"an alias for `.SFTPClient` for backwards compatability"
|
"""
|
||||||
|
An alias for `.SFTPClient` for backwards compatability.
|
||||||
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -2,9 +2,9 @@ SFTP
|
||||||
====
|
====
|
||||||
|
|
||||||
.. automodule:: paramiko.sftp
|
.. automodule:: paramiko.sftp
|
||||||
.. automodule:: paramiko.sftp_attr
|
|
||||||
.. automodule:: paramiko.sftp_client
|
.. automodule:: paramiko.sftp_client
|
||||||
|
.. automodule:: paramiko.sftp_server
|
||||||
|
.. automodule:: paramiko.sftp_attr
|
||||||
.. automodule:: paramiko.sftp_file
|
.. automodule:: paramiko.sftp_file
|
||||||
.. automodule:: paramiko.sftp_handle
|
.. automodule:: paramiko.sftp_handle
|
||||||
.. automodule:: paramiko.sftp_server
|
|
||||||
.. automodule:: paramiko.sftp_si
|
.. automodule:: paramiko.sftp_si
|
||||||
|
|
Loading…
Reference in New Issue