class SubdirsRegressionIO extends RegressionIO {

  @Override
  public List<String> enumObjects(final String type) throws IOException {
    final File subDir = getTypeFolder(type, false);
    if (!subDir.exists()) {
      s_logger.info("Directory {} doesn't exist", subDir);
      return Collections.<String>emptyList();
    }
    s_logger.info("Scanning {}", subDir.getAbsolutePath());
    final File[] files = subDir.listFiles();
    if (files == null) {
      throw new OpenGammaRuntimeException("No files found in " + subDir);
    }
    final List<String> identifiers = new ArrayList<String>(files.length);
    for (File file : files) {
      if (file.isFile()) {
        final String name = file.getName();
        if (isIdentifierIncluded(name)) {
          String identifier = stripIdentifierExtension(name);
          identifiers.add(identifier);
        }
      }
    }
    s_logger.debug("Found {} objects", identifiers.size());
    return identifiers;
  }

  public  SubdirsRegressionIO(final File baseDir, final Format format, final boolean createIfAbsent);

}