--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Opens a file on the remote server. The <tt>flags</tt> parameter determines how the flag is open, and accepts the same format as IO#open (e.g., either a string like &quot;r&quot; or &quot;w&quot;, or a combination of the IO constants). The <tt>options</tt> parameter is a hash of attributes to be associated with the file, and varies greatly depending on the SFTP protocol version in use, but some (like :permissions) are always available.
- !ruby/struct:SM::Flow::P 
  body: "Returns immediately with a Request object. If a block is given, it will be invoked when the server responds, with a Response object as the only parameter. The :handle property of the response is the handle of the opened file, and may be passed to other methods (like #close, #read, #write, and so forth)."
- !ruby/struct:SM::Flow::VERB 
  body: "  sftp.open(&quot;/path/to/file&quot;) do |response|\n    raise &quot;fail!&quot; unless response.ok?\n    sftp.close(response[:handle])\n  end\n  sftp.loop\n"
full_name: Net::SFTP::Session#open
is_singleton: false
name: open
params: |
  open(path, flags="r", options={}) -> request
  open(path, flags="r", options={}) { |response| ... } -> request

visibility: public
