How to move directories using jdk7
问题 Using jdk7 , I am trying to use the java.nio.file.Files class to move an empty directory, let's say Bar , into another empty directory, let's say Foo Path source = Paths.get("Bar"); Path target = Paths.get("Foo"); try { Files.move( source, target, StandardCopyOption.REPLACE_EXISTING); } catch (IOException e) { e.printStackTrace(); } After executing that code snippet, I expected that the Bar directory would be in the Foo directory ( ...\Foo\Bar ). Instead it is not. And here's the kicker, it's