def METHOD_NAME(self, file_name, content):
    # Write content to file_name, rolling back if there was a problem.
    self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append(
        filetransaction.FileTransaction(
            name=file_name,
            content=content,
            modifiedList=self.environment[
                otopicons.CoreEnv.MODIFIED_FILES
            ],
        )
    )