KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > cruisecontrol > logmanipulators > DeleteManipulator


1 package net.sourceforge.cruisecontrol.logmanipulators;
2
3 import java.io.File JavaDoc;
4
5 public class DeleteManipulator extends BaseManipulator {
6
7     private boolean ignoreSuffix = false;
8     
9     public void execute(String JavaDoc logDir) {
10         File JavaDoc[] deleteFiles = getRelevantFiles(logDir, ignoreSuffix);
11         for (int i = 0; i < deleteFiles.length; i++) {
12             File JavaDoc file = deleteFiles[i];
13             file.delete();
14         }
15     }
16
17     public void setIgnoreSuffix(boolean ignoreSuffix) {
18         this.ignoreSuffix = ignoreSuffix;
19     }
20
21     
22 }
23
Popular Tags