INNER CODE UNIT · Python

as_posix_abs

IvanMurzak/Unity-MCP · .github/scripts/chain_feed.py:528

def as_posix_abs(path):
    """Absolute, forward-slashed. `C:/Projects/...`, never `C:\\Projects` or `/c/...`."""
    return str(Path(path).resolve()).replace("\\", "/")


def sha256_bytes(data):
    return hashlib.sha256(data).hexdigest()


def sha256_file(path):
    digest = hashlib.sha256()
    with open(str(path), "rb") as handle:
        for chunk in iter(lambda: handle.read(1024 * 1024), b""):
            digest.update(chunk)
    return digest.hexdigest()


def log(line):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…