Sha256: b45322671093df340de07df9a3a620ec5645f1de6988f3d7b80a74b8cefc2219

Contents?: true

Size: 530 Bytes

Versions: 7

Compression:

Stored size: 530 Bytes

Contents

# frozen_string_literal: true

require_relative 'command_handler'

module Ftpd

  class CmdRetr < CommandHandler

    def cmd_retr(argument)
      close_data_server_socket_when_done do
        ensure_logged_in
        ensure_file_system_supports :read
        path = argument
        syntax_error unless path
        path = File.expand_path(path, name_prefix)
        ensure_accessible path
        ensure_exists path
        file_system.read(path) do |file|
          transmit_file file
        end
      end
    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ftpd-2.1.0 lib/ftpd/cmd_retr.rb
ftpd-2.0.5 lib/ftpd/cmd_retr.rb
ftpd-2.0.4 lib/ftpd/cmd_retr.rb
ftpd-2.0.3 lib/ftpd/cmd_retr.rb
ftpd-2.0.2 lib/ftpd/cmd_retr.rb
ftpd-2.0.1 lib/ftpd/cmd_retr.rb
ftpd-2.0.0 lib/ftpd/cmd_retr.rb