FileHandle

Random-access file handle abstraction. All operations are expected to be blocking

Properties

Link copied to clipboard
abstract val name: String

Functions

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
abstract fun exists(): Boolean
Link copied to clipboard
abstract fun length(): Long
Link copied to clipboard
abstract fun read(index: Int): Byte

Reads a single byte at index.

abstract fun read(index: Int, dstBuffer: ByteArray): ByteArray

Reads data starting at index into dstBuffer.

Link copied to clipboard
abstract fun readAll(): ByteArray
Link copied to clipboard
abstract fun write(bytes: ByteArray)

Appends/writes bytes at the current position (implementation-defined).