How to move a entire directory!

Hi, is there any direct or easy way to move a directory to another place. I guess that the File class should has a method Move, copy and things like that to make way this kind of tasks.

I guess that reading the FIle content, detecting is its folder or file, if is fil move it using a fileOutputStream, else entering the folder to do the same.

Doing this algorthym with recursivity is not as doing a helloWorld, so there should be a direct or at least more easy way to do it.

[493 byte] By [MelGohana] at [2007-11-27 3:53:59]
# 1
The File.renameTo() method is a good candidate for moving a file or a directory, as long as you aren't moving it too far.
DrClapa at 2007-7-12 8:58:04 > top of Java-index,Java Essentials,Java Programming...
# 2
From my house to another one! jajaja.Is there a limit on the destiny path size?
MelGohana at 2007-7-12 8:58:04 > top of Java-index,Java Essentials,Java Programming...
# 3
DrC was referring to moving between file systems: [url= http://java.sun.com/javase/6/docs/api/java/io/File.html#renameTo(java.io.File)]renameTo[/url]
DrLaszloJamfa at 2007-7-12 8:58:04 > top of Java-index,Java Essentials,Java Programming...
# 4
Anyway the javadoc says that is plataform dependient! so in which SOs will this work?
MelGohana at 2007-7-12 8:58:04 > top of Java-index,Java Essentials,Java Programming...