def add_file(self, filename, content):
        """
        Add ``content``, which can be a :class:`str`` or :class:`bytes`, to the build plan
        as ``filename``. The file name can be a relative path with directories separated by
        forward slashes (``/``).
        """
        assert isinstance(filename, str) and filename not in self.files
        if (pathlib.PurePosixPath(filename).is_absolute() or
                pathlib.PureWindowsPath(filename).is_absolute()):
            raise ValueError(f"Filename {filename!r} must not be an absolute path")
        self.files[filename] = content

        Add ``content``, which can be a :class:`str`` or :class:`bytes`, to the build plan
        as ``filename``. The file name can be a relative path with directories separated by
        forward slashes (``/``).
        
amaranth/build/run.py