open

common
abstract fun open(file: Path, read: Boolean = false, write: Boolean = false): FileHandle

Returns a handle to operate on file.

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.

js
abstract fun open(file: Path, read: Boolean = false, write: Boolean = false): FileHandle

Throws