Skip to main content

read_file(path)

Signature: read_file(file_path: str, *args, **kwargs) -> str

Reads and returns file contents. On error raises ClypRuntimeError with a helpful message.

Example

function example() returns null {
let s = read_file("README.md");
print(s[:200]);
}

Notes

Uses Python's open(); call with encoding keyword if needed.