Sha256: d00da84af94f2e65c225c4c3d5d24785dda686d920c534cee59fefc78f1f5f2f

Contents?: true

Size: 545 Bytes

Versions: 12

Compression:

Stored size: 545 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

module EM::FTPD::Files
  def puts(*args)
    # ignored
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pione-0.5.0 lib/pione/patch/em-ftpd-patch.rb
pione-0.5.0.alpha.2 lib/pione/patch/em-ftpd-patch.rb
pione-0.5.0.alpha.1 lib/pione/patch/em-ftpd-patch.rb
pione-0.4.2 lib/pione/patch/em-ftpd-patch.rb
pione-0.4.1 lib/pione/patch/em-ftpd-patch.rb
pione-0.4.0 lib/pione/patch/em-ftpd-patch.rb
pione-0.3.2 lib/pione/patch/em-ftpd-patch.rb
pione-0.3.1 lib/pione/patch/em-ftpd-patch.rb
pione-0.3.0 lib/pione/patch/em-ftpd-patch.rb
pione-0.2.2 lib/pione/patch/em-ftpd-patch.rb
pione-0.2.1 lib/pione/patch/em-ftpd-patch.rb
pione-0.2.0 lib/pione/patch/em-ftpd-patch.rb