Module: Ftpd::DiskFileSystem::FileWriting

Included in:
Append, Write
Defined in:
lib/ftpd/disk_file_system.rb

Overview

DiskFileSystem mixin for writing files. Used by Append and Write.

Instance Method Summary collapse

Instance Method Details

#write_file(ftp_path, contents, mode) ⇒ Object



78
79
80
81
82
# File 'lib/ftpd/disk_file_system.rb', line 78

def write_file(ftp_path, contents, mode)
  File.open(expand_ftp_path(ftp_path), mode) do |file|
    file.write contents
  end
end