Read up to length bytes from this file, starting at
position offset . The offset may be a python long, since
SFTP allows it to be 64 bits.
If the end of the file has been reached, this method may return an
empty string to signify EOF, or it may also return SFTP_EOF.
The default implementation checks for an attribute on
self named readfile , and if present, performs
the read operation on the python file-like object found there. (This is
meant as a time saver for the common case where you are wrapping a python
file object.)
- Parameters:
offset (int or long) - position in the file to start reading from.
length (int) - number of bytes to attempt to read.
- Returns: str
- data read from the file, or an SFTP error code.
|