public static String getRootDirectory(String workspaceName, String storeName, Catalog catalog) { String rootDir = getItem(workspaceName, storeName, catalog, ROOT_KEY); if (rootDir != null) { // Check if it already exists File rootFile = new File(rootDir); if (rootFile.isAbsolute()) { if (!rootFile.exists()) { if (!rootFile.mkdirs()) { rootFile.delete(); return null; } } else { if (!rootFile.isDirectory()) { LOGGER.info(rootDir + " ROOT path is not a directory"); return null; } } } } return rootDir; }