protected void processFile(File inFolder, File file, String target) throws IOException {

        final String fileExt = "." + FilenameUtils.getExtension(file.getName());

        switch (fileExt) {
            case PAGE_EXT:
                if (collectMetrics) {
                    final long time1 = System.currentTimeMillis();
                    processAndSaveFile(inFolder, file, target);
                    final long time2 = System.currentTimeMillis();
                    metrics.put(file.getAbsolutePath(), time2 - time1);
                } else {
                    processAndSaveFile(inFolder, file, target);
                }

                break;
            case GLOB_EXT:
                break;
            case TMPL_EXT:
                // do not process template files
                break;
            case IGNORE_FLAG:
                break;
            case NO_MIRROR_FLAG:
                break;
            default:
                if (!this.dryRun) {
                    copyFileIfNeeded(file, new File(target + File.separator + file.getName()));
                }
                break;
        }
    }