Class: Ftpd::ListFormat::Eplf
- Inherits:
-
Object
- Object
- Ftpd::ListFormat::Eplf
- 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
-
#initialize(file_info) ⇒ Eplf
constructor
Create a new formatter for a file object.
-
#to_s ⇒ Object
Return the formatted directory entry.
Constructor Details
#initialize(file_info) ⇒ Eplf
Create a new formatter for a file object
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_s ⇒ Object
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 |