def process_file(self, path, dryrun):
        """
        Add header to all files.
        """
        if dryrun:
            return path

        # get file's current header
        with open(path, "r") as infile:
            head = infile.read(len(self.__header))

        # normalize line breaks
        if self.__normalize_br:
            head = head.replace("\r\n", "\n")

        # already contain header? skip
        if head == self.__header:
            return path

        # add header to file
        self.push_header(path)

        # return processed file
        return path
Add header to all files.