openReadOnly

open override fun openReadOnly(file: Path): FileHandle

Returns a handle to read file. This will fail if the file doesn't already exist.

Throws

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