Module: Ftpd::DiskFileSystem::Append

Includes:
FileWriting, TranslateExceptions
Included in:
Ftpd::DiskFileSystem
Defined in:
lib/ftpd/disk_file_system.rb

Overview

DiskFileSystem mixin providing file appending

Instance Method Summary collapse

Methods included from TranslateExceptions

included, #translate_exception

Methods included from FileWriting

#write_file

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.

Parameters:

  • ftp_path (String)

    The virtual path

  • contents (String)

    The file’s contents



181
182
183
# File 'lib/ftpd/disk_file_system.rb', line 181

def append(ftp_path, contents)
  write_file ftp_path, contents, 'ab'
end