Method: Net::SFTP::Protocol::V01::Base#read
- Defined in:
- lib/net/sftp/protocol/01/base.rb
#read(handle, offset, length) ⇒ Object
Sends a FXP_READ packet to the server, requesting that length bytes be read from the file identified by handle, starting at offset bytes within the file. The handle must be one that was returned via a FXP_HANDLE packet. Returns the new packet id.
103 104 105 |
# File 'lib/net/sftp/protocol/01/base.rb', line 103 def read(handle, offset, length) send_request(FXP_READ, :string, handle, :int64, offset, :long, length) end |