mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fixcode
This commit is contained in:
@@ -21,6 +21,16 @@ public class IssueI666HBTest {
|
||||
FileUtil.move(FileUtil.file("d:/test/dir1"), FileUtil.file("d:/test/dir2"), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void moveContentDirToDirTest() {
|
||||
// 目录内容移动到目录
|
||||
// 移动内容,不移除目录本身
|
||||
PathUtil.moveContent(
|
||||
FileUtil.file("d:/test/dir1").toPath(),
|
||||
FileUtil.file("d:/test/dir2").toPath(), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void moveFileToDirTest() {
|
||||
@@ -29,6 +39,16 @@ public class IssueI666HBTest {
|
||||
FileUtil.move(FileUtil.file("d:/test/dir1/test1.txt"), FileUtil.file("d:/test/dir2"), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void moveContentFileToDirTest() {
|
||||
// 文件移动到目录
|
||||
// 会将test1.txt移动到dir2下,变成dir2/test1.txt
|
||||
PathUtil.moveContent(
|
||||
FileUtil.file("d:/test/dir1/test1.txt").toPath(),
|
||||
FileUtil.file("d:/test/dir2").toPath(), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void moveDirToDirNotExistTest() {
|
||||
@@ -37,11 +57,31 @@ public class IssueI666HBTest {
|
||||
FileUtil.move(FileUtil.file("d:/test/dir1"), FileUtil.file("d:/test/dir3"), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void moveContentDirToDirNotExistTest() {
|
||||
// 目录移动到目标,dir3不存在
|
||||
// 会将目录dir1内容移动到dir3,但是dir1目录不删除
|
||||
PathUtil.moveContent(
|
||||
FileUtil.file("d:/test/dir1").toPath(),
|
||||
FileUtil.file("d:/test/dir3").toPath(), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void moveFileToTargetNotExistTest() {
|
||||
// 目录移动到目录,将整个目录移动
|
||||
// 文件移动到不存在的路径
|
||||
// 会将test1.txt重命名为test2
|
||||
FileUtil.move(FileUtil.file("d:/test/dir1/test1.txt"), FileUtil.file("d:/test/test2"), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void moveContentFileToTargetNotExistTest() {
|
||||
// 目录移动到目录,将整个目录移动
|
||||
// 会将test1.txt重命名为test2
|
||||
PathUtil.moveContent(
|
||||
FileUtil.file("d:/test/dir1/test1.txt").toPath(),
|
||||
FileUtil.file("d:/test/test2").toPath(), false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user