Sha256: e016957533a29af4d738deb1686caaf0cda4b7bb85c93a2c44f9e07b2e4c4c4b

Contents?: true

Size: 499 Bytes

Versions: 6

Compression:

Stored size: 499 Bytes

Contents

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

6 entries across 6 versions & 2 rubygems

Version Path
ftpd-1.1.1 lib/ftpd/cmd_retr.rb
ftpd-1.1.0 lib/ftpd/cmd_retr.rb
investtools-ftpd-1.0.1 lib/ftpd/cmd_retr.rb
ftpd-1.0.1 lib/ftpd/cmd_retr.rb
ftpd-1.0.0 lib/ftpd/cmd_retr.rb
ftpd-0.17.0 lib/ftpd/cmd_retr.rb