The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Sivaraman Lakshmanan:
Hi all,
Thanks for all your replies. As you guys said, I used FileChannel of Java.nio.channel package and studied the time to copy a file. This seems much faster than the normal IO file copy but even then this FileChannel is slower than the "COPY" command of OS. Does this mean that copying of file using programming language will be slower than the OS way.
Please clarify
Regards,
Sivaraman.L
Originally posted by William Brogden:
I would expect the OS way to always be faster since the OS can use its internal file buffers directly. Any program is probably going to be working with indirect access to OS file buffers.
Bill
Originally posted by Stefan Wagner:
But copying with java should give much more easy error access.
Imagine copying 1000 files with the OS, and getting interrupted by an error while processing file 397 or 721 or which?
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Originally posted by Roger Chung-Wee:
Are you doing this as a short-term excercise or is it something which will be put into production? If it is the latter, then the file copies should be done programmatically or by scripting. I would write it in Java and run it with an Ant script.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
I agree with Roger - this sounds like it should be handled by a Version control system. (Though I would recommend SVN over CVS... )
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|