File baseDir = new File(basePath);
if (!baseDir.isDirectory())
throw new IOException("Directory does not exist: " + basePath);
TempFileFactory tff = new TempFileFactory();
tff.setTempDirectory(baseDir);
tff.setMaxAgeDays(1);
File result = tff.createTempDirectory("dirArchive_", ".tmp");
return result;
}