public List<Path> listExistentFiles() throws IOException {
    if (!Files.isDirectory(directory)) {
      return Collections.emptyList();
    }

    // find files matching fileNameFormat, extract dates of creation, and remove the oldest files
    try (DirectoryStream<Path> children = Files.newDirectoryStream(directory)) {
      List<Path> list = new ArrayList<>();
      for (Path child : children) {
        Pair<Path, Date> pair = tryParsePath(child);
        if (pair.second != null) {
          list.add(pair.first);
        }
      }
      return list;
    }
  }
public List<Path> listExistentFiles()