@classmethod
def to_file(cls, path, **kwargs) ->'LedgerCapturePlugin':
    """
        Return a :class:`LedgerCapturePlugin` that writes its output to a file.

        :param path: The file to write to.
        """
    return cls(open(path, 'w'), True, **kwargs)
