open (Net::SFTP::Protocol::V01::Base)

    # File lib/net/sftp/protocol/01/base.rb, line 73
        def open(path, flags, options)
          flags = normalize_open_flags(flags)

          if flags & (IO::WRONLY | IO::RDWR) != 0
            sftp_flags = FV1::WRITE
            sftp_flags |= FV1::READ if flags & IO::RDWR != 0
            sftp_flags |= FV1::APPEND if flags & IO::APPEND != 0
          else
            sftp_flags = FV1::READ
          end

          sftp_flags |= FV1::CREAT if flags & IO::CREAT != 0
          sftp_flags |= FV1::TRUNC if flags & IO::TRUNC != 0
          sftp_flags |= FV1::EXCL  if flags & IO::EXCL  != 0

          attributes = attribute_factory.new(options)

          send_request(FXP_OPEN, :string, path, :long, sftp_flags, :raw, attributes.to_s)
        end