1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
private static void deleteInputFilesDir(Application app, ExternalSimulatorModel model) {
Activity activity = app.getActivity();
WfProcessDefinition processDefinition = activity.getWfProcessDefinitionParent();
EPContainer container = processDefinition.getParentContainer();
IEPBase base = (IEPBase) container.getParentContainer();
String baseName = FileIO.createPathName(base.getName(), container.getName(),
processDefinition.getName(), activity.getName());
String parent = model.getInputFiles()[0].getParent();
File dir = new File(parent, baseName);
if (dir.exists()) {
try {
FileUtils.forceDelete(dir);
}
catch (IOException e) {
}
}
} |