Reputation: 1229
I have a bunch of files in a folder checked out from a repository. I have a code which has to copy the files from the folder to another folder. I do the following:
File f = new File(/* path of folder */);
File[] fs = f.listFiles();
for(int i=0; i<fs.length; i++){
FileChannel in = new FileInputStream(fs[i]).getChannel();
FileChannel out = new FileOutputStream(/* output directory */ +File.separatorChar+files[i].getName()).getChannel();
in.transferTo(0, in.size(), out);
}
However, the .svn file within the checked out directory is causing a problem. I get the exception:
java.io.FileNotFoundException: /checked_out_folder/.svn (No such file or directory)
[x] at java.io.FileInputStream.open(Native Method)
[x] at java.io.FileInputStream.<init>(FileInputStream.java:120)
Is it because it is a hidden file? What could be the solution for this? Or am I missing something here? Thanks
Upvotes: 1
Views: 2298