A convenience method for starting a standalone SFTP session. It will start up an SSH session using the given arguments (see the documentation for Net::SSH::Session for details), and will then start a new SFTP session with the SSH session. If a block is given, it will be passed to the SFTP session.
Source Code
# File net/sftp.rb, line 27 def start( *args, &block ) session = Net::SSH.start( *args ) Net::SFTP::Session.new( session, &block ) ensure session.close if session && block_given? end
<code/>and<pre/>for code samples.