implementing HgRepositoryManager

This commit is contained in:
Sebastian Sdorra
2010-09-09 10:22:57 +02:00
parent db6ddfb59e
commit 5368c4b410
4 changed files with 577 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ package sonia.scm.util;
//~--- JDK imports ------------------------------------------------------------
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
@@ -49,6 +50,35 @@ public class Util
}
}
/**
* Method description
*
*
* @param file
*
* @throws IOException
*/
public static void delete(File file) throws IOException
{
if (file.isDirectory())
{
File[] children = file.listFiles();
if (children != null)
{
for (File child : children)
{
delete(child);
}
}
}
if (!file.delete())
{
throw new IOException("could not delete file ".concat(file.getPath()));
}
}
//~--- get methods ----------------------------------------------------------
/**