L
Louis J Scoras
------=_Part_4105_13322455.1128020217396
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Does anyone know off the top of their head why the 'open_handle' method
might return a string?
require 'net/sftp'
Net::SFTP.start('remotehost1') do |sftp|
sftp.put_file(foo, foobar)
sftp.open_handle(foobar) do |handle|
puts handle.inspect # =3D> "\000\000\000\000"
puts handle.class # =3D> "String"
puts data.read # =3D> Raises error: method not defined
end
end
It's not that the connection is bad, because the 'put_file' method works
okay, and the file gets uploaded to the remote host just fine.
Looking in the documentation leads me to believe that the call is right.
Taking a cursory look through the source suggests that the return should be
some object that delegates the IO operation to the Net::SFTP::Operation
subclasses--if I'm reading it correctly
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Does anyone know off the top of their head why the 'open_handle' method
might return a string?
require 'net/sftp'
Net::SFTP.start('remotehost1') do |sftp|
sftp.put_file(foo, foobar)
sftp.open_handle(foobar) do |handle|
puts handle.inspect # =3D> "\000\000\000\000"
puts handle.class # =3D> "String"
puts data.read # =3D> Raises error: method not defined
end
end
It's not that the connection is bad, because the 'put_file' method works
okay, and the file gets uploaded to the remote host just fine.
Looking in the documentation leads me to believe that the call is right.
Taking a cursory look through the source suggests that the return should be
some object that delegates the IO operation to the Net::SFTP::Operation
subclasses--if I'm reading it correctly