public static void clearDirectory(String dir) throws HyscaleException {
		File directory = new File(dir);
		if (directory.isDirectory()) {
			// true only if file path is directory and exists
			try {
				FileUtils.cleanDirectory(directory);
			} catch (IOException e) {
				throw new HyscaleException(e, CommonErrorCode.FAILED_TO_CLEAN_DIRECTORY, dir);
			}
		}
	}
Clears directory including internal dirs

@param dir
@throws HyscaleException
commons/src/main/java/io/hyscale/commons/io/HyscaleFilesUtil.java