class EM::FTPD::Server

Public Instance Methods

cmd_mdtm(param) click to toggle source

get the file’s mtime

# File lib/pione/patch/em-ftpd-patch.rb, line 6
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