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:



16
17
18
# File 'lib/ftpd/list_format/eplf.rb', line 16

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



25
26
27
# File 'lib/ftpd/list_format/eplf.rb', line 25

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