------ art_4427_29827639.1128023334136 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 9/29/05, Jamis Buck <jamis / 37signals.com> wrote: > > No, it is correct. open_handle returns an opaque value that > represents a remote file (or directory) handle. It just happens to be > implemented as a string. To use it, you call sftp.read and > sftp.write, passing the handle to it. (You can look at the > synchronous.rb file in the examples subdirectory of the net-sftp > distro for more examples of how to use open-handle). > > - Jamis > > > Hrmm... I only assumed it was wrong because I got an error when I tried sending read/write to the handle: sftp_t.rb:8: undefined method `read' for "\000\000\000\000":String (NoMethodError) from sftp_t.rb:5:in `open_handle' from sftp_t.rb:5 from sftp_t.rb:3:in `initialize' from /usr/lib/ruby/1.8/net/sftp/session.rb:45:in `call' from /usr/lib/ruby/1.8/net/sftp/protocol/driver.rb:152:in `do_version' from /usr/lib/ruby/1.8/net/sftp/protocol/driver.rb:183:in `do_data' from /usr/lib/ruby/1.8/net/sftp/protocol/driver.rb:19:in `to_proc' from /usr/lib/ruby/1.8/net/sftp/protocol/driver.rb:103:in `call' from /usr/lib/ruby/1.8/net/ssh/connection/channel.rb:496:in `callback' from /usr/lib/ruby/1.8/net/ssh/connection/channel.rb:447:in `do_data' from /usr/lib/ruby/1.8/net/ssh/connection/driver.rb:285:in `do_channel_data' from /usr/lib/ruby/1.8/net/ssh/connection/driver.rb:151:in `process' from /usr/lib/ruby/1.8/net/ssh/connection/driver.rb:134:in `loop' from /usr/lib/ruby/1.8/net/ssh/session.rb:161:in `loop' from /usr/lib/ruby/1.8/net/sftp/session.rb:66:in `initialize' from /usr/lib/ruby/1.8/net/sftp.rb:29:in `start' -- Lou ------ art_4427_29827639.1128023334136--