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



110
111
112
# File 'lib/ftpd/disk_file_system.rb', line 110

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