need a better file copy method
"Jim C." <[email protected]> Mon, 01 May 2006 13:41:12 -0700
| Newsgroups | gmane.comp.java.linux.general |
|---|---|
| Message-ID | <[email protected]> |
OK, so I need to do a simple file copy for a unit test. I found a great code example here: http://tinyurl.com/kkhju Problem is: My test will fail roughly 50% of the time because the test's data file is not finished copying. I've done everything I can imagine to accomplish this in a synchronous manner so that I don't have to use a Thread.sleep(); but I can't find a way without having those intermittent failures. I think this is because of the underlying file system. Anyone know how a simple file copy can be accomplished in an explicitly synchronous manner without adding Thread.sleep(n) after calling flush on the output stream? Jim C. ---------------------------------------------------------------------- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]