Class | Net::SFTP::Operations::Read |
In: |
lib/net/sftp/operations/read.rb
|
Parent: | Abstract |
Implements the read operation, which reads data from an open file handle. This also implements the common case of reading to the end of the file. In that case, the callback is guaranteed to receive the contents of the entire file in one chunk.
DEFAULT_CHUNK_SIZE | = | 64 * 1024 | The default maximum amount of data to read at once when reading an entire file. |
Invoked when a data packet is received from the server. If the original request was for an entire file, this will send another read request, offset to the end of the data that has been read so far. Otherwise, the callback will be invoked directly.
Invoked when a status code is received from the server. If the code is FX_EOF, then no data could be read because the end of the file was reached. In this case, the callback is invoked with the data that has been read so far. Other status codes are handled by the superclass.