On 07/11/2013 11:34, Chris Hegarty wrote:
:

I've also received another comment offline about the method names. They should be more descriptive, and highlight the difference between these methods and regular delete. So maybe move to public deleteWithRetry?
That might be a bit better as otherwise it's not obvious how it differs from Files.delete. Also to keep the names consistent then deleteTreeWithRetry should probably be deleteFileTreeWithRetry.

On interrupting the sleep then it looks like the methods aren't consistent, one will throw InterruptedException, the other will complete early without an exception and without the interrupt status set.

If you want then you could extend SimpleFileVisitor instead, that would allow you to drop the preVisitDirectory method.

A passing comment on closetest/Command is that the copyFile method could use Files.copy with REPLACE_EXISTING.

Also rm_minus_rf (amusing name) doesn't need to use isFile or isDirectory as FilesUtil.deleteFIleTree will do the right thing.

-Alan.

Reply via email to