INNER CODE UNIT · Python
read_text
IvanMurzak/Unity-MCP · .github/scripts/chain_feed.py:549
def read_text(path):
"""Read with newline translation OFF so a CRLF file survives a surgical edit."""
with io.open(str(path), "r", encoding="utf-8", newline="") as handle:
return handle.read()
def write_text(path, text, newline=""):
Path(path).parent.mkdir(parents=True, exist_ok=True)
with io.open(str(path), "w", encoding="utf-8", newline=newline) as handle:
handle.write(text)
def host_rid():
"""`win-x64` / `linux-x64` / `osx-arm64` — the RID this runner publishes for."""
system = platform.system()
if system == "Windows":
return "win-x64"
if system == "Darwin":