def serialize_changeset()

in fluent/migrate/tool.py [0:0]


    def serialize_changeset(self, snapshot):
        """Write serialized FTL files to disk."""
        for path, content in snapshot.items():
            fullpath = os.path.join(self.localization_dir, path)
            print(f"  Writing to {fullpath}")
            if not self.dry_run:
                fulldir = os.path.dirname(fullpath)
                if not os.path.isdir(fulldir):
                    os.makedirs(fulldir)
                with open(fullpath, "wb") as f:
                    f.write(content.encode("utf8"))
                    f.close()