This method is deprecated or moved on the latest stable version.
The last existing version (v1_8_7_330) is shown here.
move(from, to, verbose = false)
public
Moves a file from to to using #syscopy. If to is a
directory, copies from from to to/from. If
verbose is true, from -> to is printed.
# File lib/ftools.rb, line 99
def move(from, to, verbose = false)
to = catname(from, to)
$stderr.print from, " -> ", to, "\n" if verbose
if RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw/ and file? to
unlink to
end
fstat = stat(from)
begin
rename from, to
rescue
begin
symlink readlink(from), to and unlink from
rescue
from_stat = stat(from)
syscopy from, to and unlink from
utime(from_stat.atime, from_stat.mtime, to)
begin
chown(fstat.uid, fstat.gid, to)
rescue
end
end
end
end