can i copy a directory from one place to another place directly?
Because many method which i have used does this, but they ll ultimately end up in copying each file by 开发者_JAVA技巧it conetents? as i have text files with lots of contents i will be a slow process?
You could use FileUtils from Apache Commons IO?
I would recommend something like FileUtils from Apache Commons IO.
I'm not sure if you want to move a directory, or or the files in it, but could you use renameTo and something like...
File origDir = new File("OrigDir");
File newDir = new File("NewDir");
origDir.renameTo(new File(newDir, origDir.getName()));
精彩评论