parent
00f42c6bcd
commit
11fb528c8c
1 changed files with 28 additions and 0 deletions
28
src/settingsfunctions/DeleteDatabase.java
Normal file
28
src/settingsfunctions/DeleteDatabase.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
package settingsfunctions;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class DeleteDatabase {
|
||||
|
||||
private void deleter(String database) {
|
||||
File filelength = new File("C:\\ExtremeDemonList\\" + database);
|
||||
File[] filelengthindex = filelength.listFiles();
|
||||
for(File file : filelengthindex) {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteCompleted() {
|
||||
deleter("completed");
|
||||
}
|
||||
|
||||
public void deleteUncompleted() {
|
||||
deleter("levels");
|
||||
}
|
||||
|
||||
public void deleteAll() {
|
||||
deleteCompleted();
|
||||
deleteUncompleted();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue