Sha256: 7da7e7313cad94cdff8dd15c93b58e92a07d2a83bc25f33c0475692a74ebe4eb

Contents?: true

Size: 478 Bytes

Versions: 2

Compression:

Stored size: 478 Bytes

Contents

module EM::FTPD
  class Server
    COMMANDS << "mdtm"

    # get the file's mtime
    def cmd_mdtm(param)
      send_unauthorised and return unless logged_in?
      send_param_required and return if param.nil?

      path = build_path(param)

      @driver.mtime(path) do |result|
        if result.kind_of?(Time)
          send_response result.strftime("213 %Y%m%d%H%M%S%L")
        else
          send_response "550 file not available"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pione-0.1.4 lib/pione/patch/em-ftpd-patch.rb
pione-0.1.3 lib/pione/patch/em-ftpd-patch.rb