code: private static File getPreferenceFile(final File directory) {
      List<File> candidates = ImmutableList.of(
        new File(directory, "operaprefs.ini"),
        new File(directory, "opera.ini"));
  
      for (File candidate : candidates) {
        if (candidate.exists()) {
          return candidate;
        }
      }
  
      return candidates.get(0);
    }
docs: Opera preference files can be named either <code>opera.ini</code> or
  <code>operaprefs.ini</code> depending on the product.  This method will look in the specified
  directory for either of the files and return the one that exists.  <code>operaprefs.ini</code>
  has priority.
  
  @param directory the directory to look for a preference file
  @return a preference file