Module: Ftpd::DiskFileSystem::Rename

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

Overview

DiskFileSystem mixin providing file/directory rename/move

Instance Method Summary collapse

Methods included from TranslateExceptions

included, #translate_exception

Instance Method Details

#rename(from_ftp_path, to_ftp_path) ⇒ Object

Rename or move a file or directory

Called for:

  • RNTO

If missing, then these commands are not supported.



352
353
354
355
# File 'lib/ftpd/disk_file_system.rb', line 352

def rename(from_ftp_path, to_ftp_path)
  FileUtils.mv(expand_ftp_path(from_ftp_path),
               expand_ftp_path(to_ftp_path))
end