You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by Paul Baclace <pe...@baclace.net> on 2005/10/12 08:28:44 UTC

org.apache.commons.io.FileUtils

I need a recursive file delete for cleaning up after a JUnit test.
There is one in Commons IO (org.apache.commons.io):

   FileUtils.deleteDirectory(File directory)

I wonder whether I should use org.apache.commons.io as a new
jar added to lib or arrange a libtest for jars only used by
JUnit tests, or write yet another recursive delete and put
it in src/test/org/apache/nutch/util.

If org.apache.commons.io were included, then ndfs/DF.java could
almost be replaced by FileSystemUtils.freeSpace(path), but DF
also reports disk space capacity.

Paul

Re: org.apache.commons.io.FileUtils

Posted by Paul Baclace <pe...@baclace.net>.
Paul Baclace wrote:
> I need a recursive file delete for cleaning up after a JUnit test.

I just now spotted:

   org.apache.nutch.fs.LocalFileSystem.delete(File f)

which does what I want (recursive, local delete).

So no need for common.io.

Paul