open Read Write
expect abstract fun openReadWrite(file: Path, mustCreate: Boolean = false, mustExist: Boolean = false): FileHandle
Returns a handle to read and write file. This will create the file if it doesn't already exist.
Parameters
must Create
true to throw an IOException instead of overwriting an existing file. This is equivalent to O_EXCL
on POSIX and CREATE_NEW
on Windows.
must Exist
true to throw an IOException instead of creating a new file. This is equivalent to r+
on POSIX and OPEN_EXISTING
on Windows.