Home | Trees | Index | Help |
---|
Package paramiko :: Module sftp :: Class SFTP |
|
object
--+
|
SFTP
Method Summary | |
---|---|
__init__(self,
sock)
| |
Change the mode (permissions) of a file. | |
Change the owner ( uid ) and group (gid ) of a
file. | |
from_transport(selfclass,
t)
(Class method) | |
list of string |
Return a list containing the names of the entries in the given path . |
SFTPAttributes |
Retrieve information about a file on the remote system, without following symbolic links (shortcuts). |
Create a folder (directory) named path with numeric mode
mode . | |
SFTPFile |
Open a file on the remote server. |
string |
Return the target of a symbolic link (shortcut). |
Remove the file at the given path. | |
Rename a file or folder from oldpath to
newpath . | |
Remove the folder named path . | |
SFTPAttributes |
Retrieve information about a file on the remote system. |
Create a symbolic link (shortcut) of the source path at
destination . | |
Remove the file at the given path. | |
Set the access and modified times of the file specified by path . | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Instance Method Details |
---|
chmod(self, path, mode)Change the mode (permissions) of a file. The permissions are unix-style and identical to those used by python'sos.chmod function.
|
chown(self, path, uid, gid)Change the owner (uid ) and group (gid ) of
a file. As with python's os.chown function, you must pass
both arguments, so if you only want to change one, use stat first to retrieve the current owner
and group.
|
listdir(self, path)Return a list containing the names of the entries in the givenpath . The list is in arbitrary order. It does not include
the special entries '.' and '..' even if they
are present in the folder.
|
lstat(self, path)Retrieve information about a file on the remote system, without following symbolic links (shortcuts). This otherwise behaves exactly the same asstat .
|
mkdir(self, path, mode=511)Create a folder (directory) namedpath with numeric
mode mode . The default mode is 0777 (octal). On some
systems, mode is ignored. Where it is used, the current umask value is
first masked out.
|
open(self, filename, mode='r', bufsize=-1)Open a file on the remote server. The arguments are the same as for
python's built-in 'r'
for reading, 'w' for writing (truncating an existing
file), 'a' for appending, 'r+' for
reading/writing, 'w+' for reading/writing (truncating an
existing file), 'a+' for reading/appending. The python
'b' flag is ignored, since SSH treats all files as binary.
The 'U' flag is supported in a compatible way.
|
readlink(self, path)Return the target of a symbolic link (shortcut). You can usesymlink to create these. The result may
be either an absolute or relative pathname.
|
remove(self, path)Remove the file at the given path.
|
rename(self, oldpath, newpath)Rename a file or folder fromoldpath to
newpath .
|
rmdir(self, path)Remove the folder namedpath .
|
stat(self, path)Retrieve information about a file on the remote system. The return
value is an object whose attributes correspond to the attributes of
python's Unlike a python st_mode ,
st_size , st_uid , st_gid ,
st_atime , and st_mtime .
|
symlink(self, source, dest)Create a symbolic link (shortcut) of thesource path at
destination .
|
unlink(self, path)Remove the file at the given path.
|
utime(self, path, times)Set the access and modified times of the file specified bypath . If times is None , then the
file's access and modified times are set to the current time.
Otherwise, times must be a 2-tuple of numbers, of the form
(atime, mtime) , which is used to set the access and
modified times, respectively. This bizarre API is mimicked from python
for the sake of consistency -- I apologize.
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Fri Apr 23 15:55:50 2004 | http://epydoc.sf.net |