public void createDump(boolean directory, String name) throws Exception {
File target = new File(name);
DumpDestination destination;
if (directory) {
destination = new DirectoryDumpDestination(target);
} else {
destination = new ZipDumpDestination(target);
}
for (DumpProvider provider : providers) {