File dataDir=new File(args[0]);
File snapDir=dataDir;
if(args.length==2){
snapDir=new File(args[1]);
}
FileTxnSnapLog txnLog = new FileTxnSnapLog(dataDir, snapDir);
// found any valid recent snapshots?
// files to exclude from deletion
Set<File> exc=new HashSet<File>();
File snapShot = txnLog.findMostRecentSnapshot();
exc.add(txnLog.findMostRecentSnapshot());
long zxid = Util.getZxidFromName(snapShot.getName(),"snapshot");
exc.addAll(Arrays.asList(txnLog.getSnapshotLogs(zxid)));
final Set<File> exclude=exc;
class MyFileFilter implements FileFilter{
private final String prefix;
MyFileFilter(String prefix){