RegisterFile¶
- class RegisterFile(data: RegisterData = <cfinterface.data.registerdata.RegisterData object>)[source]¶
Class that models a file divided by registers, where the reading and writing are given by a series of registers.
- classmethod read(content: str | bytes, *args: Any, version: str | None = None, **kwargs: Any) RegisterFile[source]¶
Read from a file path or buffer.
versionselects a component set from VERSIONS without mutating the class.
- classmethod read_many(paths: list[str], *, version: str | None = None) dict[str, RegisterFile][source]¶
Read multiple files and return a dict keyed by file path.
- Parameters:
- pathslist[str]
File paths to read.
- versionstr or None, optional
Version key passed to
read(). Defaults to None.
- Returns:
- dict[str, RegisterFile]
Mapping from each file path to its parsed RegisterFile instance.