Module: Ftpd::DiskFileSystem::FileWriting
Overview
DiskFileSystem mixin for writing files. Used by Append and Write.
Instance Method Summary collapse
Instance Method Details
#write_file(ftp_path, stream, mode) ⇒ Object
80 81 82 83 84 85 86 |
# File 'lib/ftpd/disk_file_system.rb', line 80 def write_file(ftp_path, stream, mode) File.open((ftp_path), mode) do |file| while line = stream.read file.write line end end end |