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
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_s ⇒ Object
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 |