Sure you can copy files in Java! It's easy! All you have to do is write a routine to read the contents of one file and write it to another file!
What do you mean, there should be a library routine to do this? What do you mean, you want to portably take advantage of whatever OS facilities exist to do this?
Is there something about "copying files in Java is easy" that doesn't make sense to you?
How Often Do You Need This? (Score:2)
My question for Java developers is always the same: can you, without looking at the docs, write the code to open a file, read the first line from the file (delimited by a newline) and print said line? The answer is invariably "no, but ...".
The counter-argument is that since they don't need to do this very often, there's no need to optimize this. When you're working in an "enterprise" environment, you're not constantly opening and reading files. Just to prove this point, I ran this on our codebase here
Re: (Score:2)