open (Net::SFTP::Operations::FileFactory)

    # File lib/net/sftp/operations/file_factory.rb, line 39
        def open(name, flags="r", mode=nil, &block)
          handle = sftp.open!(name, flags, :permissions => mode)
          file = Operations::File.new(sftp, handle)

          if block_given?
            begin
              yield file
            ensure
              file.close
            end
          else
            return file
          end
        end