File file = new File(absoluteDiskPath);
if (!file.exists()) {
if (file.mkdir()) {
System.out.println("Directory is created!");
try {
writeText(textcontent, textFileName, eventDate, eventCat, absoluteDiskPath+"\\"+eventCat+"\\"+eventName);
writeImage(imagecontent, imageFileName, eventDate, eventCat, absoluteDiskPath+"\\"+eventCat+"\\"+eventName);
imagecontent.close();
textcontent.close();
UplodedData.flush();
} catch (IOException e) {
e.printStackTrace();
return false;
}
return true;
} else {
System.out.println("Failed to create directory!");