Home | Trees | Index | Help |
---|
Package paramiko :: Module sftp_file :: Class SFTPFile |
|
object
--+ |BufferedFile
--+ | SFTPFile
Method Summary | |
---|---|
__init__(self,
sftp,
handle,
mode,
bufsize)
| |
Close the file. | |
float |
Returns the timeout in seconds (as a float) associated with the socket or ssh Channel used for this file. |
Set the file's current position, like stdio's fseek . | |
Set blocking or non-blocking mode on the underiying socket or ssh Channel . | |
Set a timeout on read/write operations on the underlying socket or ssh Channel . | |
SFTPAttributes |
Retrieve information about this file from the remote system. |
(subclass override) Return the size of the file. | |
(subclass override) Read data from the stream. | |
(subclass override) Write data into the stream. | |
Inherited from BufferedFile | |
iterator |
Returns an iterator that can be used to iterate over the lines in this file. |
Write out any data in the write buffer. | |
str |
Returns the next line from the input, or raises StopIteration when EOF is hit. |
str |
Read at most size bytes from the file (less if we hit the
end of the file first). |
str |
Read one entire line from the file. |
list |
Read all remaining lines using readline and return them as a list. |
int |
Return the file's current position. |
Write data to the file. | |
Write a sequence of strings to the file. | |
iterator |
Identical to iter(f) . |
| |
Subclasses call this method to initialize the BufferedFile. | |
| |
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) |
Class Variable Summary | |
---|---|
int |
MAX_REQUEST_SIZE = 32768 |
Inherited from BufferedFile | |
int |
SEEK_CUR = 1 |
int |
SEEK_END = 2 |
int |
SEEK_SET = 0 |
int |
_DEFAULT_BUFSIZE = 8192 |
Method Details |
---|
close(self)Close the file. Future read and write operations will fail.
|
gettimeout(self)Returns the timeout in seconds (as a float) associated with the socket or sshChannel used for this file.
|
seek(self, offset, whence=0)Set the file's current position, like stdio'sfseek .
Not all file objects support seeking.
|
setblocking(self, blocking)Set blocking or non-blocking mode on the underiying socket or sshChannel .
|
settimeout(self, timeout)Set a timeout on read/write operations on the underlying socket or sshChannel .
|
stat(self)Retrieve information about this file from the remote system. This is exactly likeSFTP.stat , except that it operates on an
already-open file.
|
_get_size(self)(subclass override) Return the size of the file. This is called from within_set_mode if the file is opened in append
mode, so the file position can be tracked and seek and tell will work correctly. If the file is
a stream that can't be randomly accessed, you don't need to override
this method,
|
_read(self, size)(subclass override) Read data from the stream. ReturnNone or raise EOFError to indicate EOF.
|
_write(self, data)(subclass override) Write data into the stream.
|
Class Variable Details |
---|
MAX_REQUEST_SIZE
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Sun Dec 12 02:04:26 2004 | http://epydoc.sf.net |