} else {
FileName lastPath = (FileName) paths.removeLast();
boolean lastPathXsists = vfs.exists(shell.getUserCtx(), lastPath, true);
if (lastPathXsists) {
FileInfo lastInfo = vfs.getFileInfo(shell.getUserCtx(), lastPath, false);
if (lastInfo.isDirectory() && (force || !errors)) {
log.debug("1.Moving multiple files to dir.");
Iterator it = paths.iterator();
while (it.hasNext()) {
FileName path = (FileName) it.next();
FileInfo info = vfs.getFileInfo(shell.getUserCtx(), path, true);
if (move(info, lastPath.absolutize(path.getName()), force, vfs, out) && !force)
return;
}
} else if ((paths.size() == 1) && force) {
log.debug("1.Moving file (overwrite).");
FileName path = (FileName) paths.getFirst();
FileInfo info = vfs.getFileInfo(shell.getUserCtx(), path, true);
if (move(info, lastPath, force, vfs, out) && !force)
return;
} else {
if (canThrowEx()) {
throw new RuntimeException(lastPath + ": Destination path is not a directory!");
} else {
out.println(lastPath + ": Destination path is not a directory!");
}
}
} else if (paths.size() == 1) {
log.debug("1.Moving file.");
FileName path = (FileName) paths.getFirst();
FileInfo info = vfs.getFileInfo(shell.getUserCtx(), path, true);
if (move(info, lastPath, force, vfs, out) && !force)
return;
} else {
if (canThrowEx()) {