source

common
abstract fun source(file: Path): Source

Returns a source that reads the bytes of file from beginning to end.

Throws

if file does not exist, is not a file, or cannot be read. A file cannot be read if the current process doesn't have access to file, if there's a loop of symbolic links, or if any name is too long.

js
abstract fun source(file: Path): Source

Throws