1 22 23 package org.meshcms.util; 24 25 import java.io.*; 26 27 30 public class DirectoryRemover extends DirectoryParser { 31 private boolean result; 32 33 public DirectoryRemover(File dir) { 34 setInitialDir(dir); 35 setRecursive(true); 36 setProcessStartDir(true); 37 result = true; 38 } 39 40 protected void postProcessDirectory(File file, Path path) { 41 if (!Utils.forceDelete(file)) { 42 result = false; 43 } 44 } 45 46 protected void processFile(File file, Path path) { 47 if (!Utils.forceDelete(file)) { 48 result = false; 49 } 50 } 51 52 58 public boolean getResult() { 59 return result; 60 } 61 } 62 | Popular Tags |