01: package vicazh.hyperpool;
02:
03: import java.io.*;
04:
05: /**
06: * The cleaner
07: *
08: * @author Victor Zhigunov
09: * @version 0.4.0
10: */
11: public class Cleaner {
12: static public void run(final String prefix) throws IOException {
13: File[] l = File.createTempFile(prefix, null).getParentFile()
14: .listFiles(new FileFilter() {
15: public boolean accept(File pathname) {
16: return pathname.getName().startsWith(prefix);
17: }
18: });
19: for (File f : l)
20: f.delete();
21: }
22: }
|