Module: Ftpd::DiskFileSystem::Read

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

Overview

DiskFileSystem mixin providing file reading

Instance Method Summary collapse

Methods included from TranslateExceptions

included, #translate_exception

Instance Method Details

#read(ftp_path) ⇒ Object

Read a file into memory. Called for:

  • RETR

If missing, then these commands are not supported.

Parameters:

  • ftp_path (String)

    The virtual path



128
129
130
# File 'lib/ftpd/disk_file_system.rb', line 128

def read(ftp_path)
  File.open(expand_ftp_path(ftp_path), 'rb', &:read)
end