Sha256: 5aaabbb1198f412187b5a708b2edaf439fe63f814da4a2ce3c366c780f892aea
Contents?: true
Size: 481 Bytes
Versions: 5
Compression:
Stored size: 481 Bytes
Contents
require_relative 'command_handler' module Ftpd class CmdSize < CommandHandler def cmd_size(path) ensure_logged_in ensure_file_system_supports :read syntax_error unless path path = File.expand_path(path, name_prefix) ensure_accessible(path) ensure_exists(path) contents = file_system.read(path) contents = (data_type == 'A') ? unix_to_nvt_ascii(contents) : contents reply "213 #{contents.bytesize}" end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
ftpd-0.16.0 | lib/ftpd/cmd_size.rb |
ftpd-0.15.0 | lib/ftpd/cmd_size.rb |
ftpd-0.14.0 | lib/ftpd/cmd_size.rb |
ftpd-0.13.0 | lib/ftpd/cmd_size.rb |
ftpd-0.12.0 | lib/ftpd/cmd_size.rb |