Sha256: 0d1b92d51e2be6e6e021a73bb75023762ca030a350206cd9c03a803f82d00315

Contents?: true

Size: 437 Bytes

Versions: 6

Compression:

Stored size: 437 Bytes

Contents

require_relative 'command_handler'

module Ftpd

  class CmdDele < CommandHandler

    def cmd_dele(argument)
      ensure_logged_in
      ensure_file_system_supports :delete
      path = argument
      error "Path required", 501 unless path
      path = File.expand_path(path, name_prefix)
      ensure_accessible path
      ensure_exists path
      file_system.delete path
      reply "250 DELE command successful"
    end

  end

end

Version data entries

6 entries across 6 versions & 2 rubygems

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