Class: Ftpd::ListFormat::Eplf

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/ftpd/list_format/eplf.rb

Overview

Easily Parsed LIST Format (EPLF) Directory formatter See: http://cr.yp.to/ftp/list/eplf.html

Instance Method Summary collapse

Constructor Details

#initialize(file_info) ⇒ Eplf

Create a new formatter for a file object

Parameters:


14
15
16
# File 'lib/ftpd/list_format/eplf.rb', line 14

def initialize(file_info)
  @file_info = file_info
end

Instance Method Details

#to_sObject

Return the formatted directory entry. For example:

+i8388621.48598,m824253270,r,s612, 514.html

Note: The calling code adds the rn


23
24
25
# File 'lib/ftpd/list_format/eplf.rb', line 23

def to_s
  "+%s\t%s" % [facts, filename]
end