fs.mkdirs(dir);
} else if (!fs.isDirectory(dir)) {
throw new FileNotFoundException("Not a directory " + dir.toString());
}
PathFilter filter = new GlobFilter(SliderKeys.HISTORY_FILENAME_GLOB_PATTERN);
FileStatus[] stats = fs.listStatus(dir, filter);
List<Path> paths = new ArrayList<>(stats.length);
for (FileStatus stat : stats) {
log.debug("Possible entry: {}", stat.toString());
if (stat.isFile() && (includeEmptyFiles || stat.getLen() > 0)) {