Module: Ftpd::DiskFileSystem::Append
- Includes:
- TranslateExceptions
- Included in:
- Ftpd::DiskFileSystem
- Defined in:
- lib/ftpd/disk_file_system.rb
Overview
DiskFileSystem mixin providing file appending
Instance Method Summary collapse
-
#append(ftp_path, contents) ⇒ Object
Append to a file.
Methods included from TranslateExceptions
included, #translate_exception
Instance Method Details
#append(ftp_path, contents) ⇒ Object
Append to a file. If the file does not exist, create it. Called for:
-
APPE
If missing, then these commands are not supported.
163 164 165 166 167 |
# File 'lib/ftpd/disk_file_system.rb', line 163 def append(ftp_path, contents) File.open((ftp_path), 'ab') do |file| file.write contents end end |