Module: FileUtils

Defined in:
lib/transcriptic/core_ext/file_utils.rb

Class Method Summary collapse

Class Method Details

.mv(src, dest, options = {}) ⇒ Object

Override mv to avoid several bugs (Errno::EACCES in Windows, Errno::ENOENT

with relative softlinks on Linux), by forcing to copy and delete instead

See Also:

  • {FileUtils{FileUtils::mv}
  • {safe_mv}


10
11
12
13
# File 'lib/transcriptic/core_ext/file_utils.rb', line 10

def mv(src, dest, options = {})
  FileUtils.cp_r(src, dest, options)
  FileUtils.rm_rf(src)
end