def dump_folder_metadata(self, results):
        """This function takes the metadata results as input and writes them to a JSON file
        in the `self.output_folder`. The results are formatted with indentation and
        sorted keys before being written to the file.
        """
        metadata_path = os.path.join(self.output_folder, f"{self.host}.json")
        try:
            with open(metadata_path, "w", encoding="utf-8") as fd:
                fd.write(json.dumps(results, indent=4, sort_keys=True))
            self.logger.success(f'Saved share-file metadata to "{metadata_path}".')
        except Exception as e:
            self.logger.fail(f"Failed to save share metadata: {str(e)}")
This function takes the metadata results as input and writes them to a JSON file
        in the `self.output_folder`. The results are formatted with indentation and
        sorted keys before being written to the file.
        
cme/modules/spider_plus.py