// delegate unpacked archives to SystemDir handler
if (deployment.isDirectory())
return new SystemDir(toUrl(deployment.getAbsolutePath()));
// if it's a file delegate to ZipDir handler
ZipDir delegate = new ZipDir(toUrl("file:/" + deployment.getAbsolutePath()));
return delegate;
}