Java Code Examples for

The following are Jave code examples for showing how to use moveDirectoryToDirectory() of the class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: wx-idk   File:   View Source Code Vote up 5 votes
 * 移动目录
 * @author Rocye
 * @param srcPath 	移动目录的源路径
 * @param destPath 	移动目录的目的路径
 * @param isMoveRoot 是否移动根目录 true 为移动根目录 false 为不移动根目录,只移动根目录下的所有文件以及文件夹
 * @return true OR false
 * @version 2017-02-28
public static boolean moveFolder(String srcPath, String destPath, boolean isMoveRoot) {
	try {
			FileUtils.moveDirectoryToDirectory(new File(srcPath), new File(destPath), true);
			FileUtils.moveDirectory(new File(srcPath), new File(destPath));
		return true;
	} catch (IOException e) {
		logger.error("调用ApacheCommon移动文件夹时:" + e.toString());
		return false;