Sha256: bee97520f2ea7cd35668420c11072518cd979750c665ae73499c99691b895278

Contents?: true

Size: 518 Bytes

Versions: 11

Compression:

Stored size: 518 Bytes

Contents

require_relative 'command_handler'

module Ftpd

  class CmdMkd < CommandHandler

    def cmd_mkd(argument)
      syntax_error unless argument
      ensure_logged_in
      ensure_file_system_supports :mkdir
      path = File.expand_path(argument, name_prefix)
      ensure_accessible path
      ensure_exists File.dirname(path)
      ensure_directory File.dirname(path)
      ensure_does_not_exist path
      file_system.mkdir path
      reply %Q'257 "#{path}" created'
    end
    alias cmd_xmkd :cmd_mkd

  end

end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
ftpd-1.1.1 lib/ftpd/cmd_mkd.rb
ftpd-1.1.0 lib/ftpd/cmd_mkd.rb
investtools-ftpd-1.0.1 lib/ftpd/cmd_mkd.rb
ftpd-1.0.1 lib/ftpd/cmd_mkd.rb
ftpd-1.0.0 lib/ftpd/cmd_mkd.rb
ftpd-0.17.0 lib/ftpd/cmd_mkd.rb
ftpd-0.16.0 lib/ftpd/cmd_mkd.rb
ftpd-0.15.0 lib/ftpd/cmd_mkd.rb
ftpd-0.14.0 lib/ftpd/cmd_mkd.rb
ftpd-0.13.0 lib/ftpd/cmd_mkd.rb
ftpd-0.12.0 lib/ftpd/cmd_mkd.rb