position

expect abstract fun position(): Long(source)

Retrieves the current position of the file pointer for which the next operation will occur at.

NOTE: If this is a Write stream and Write.isAppending is true, this will always return the current size.

Return

The current position of the file pointer.

Throws

If the stream is closed.


expect abstract fun position(new: Long): FileStream(source)

Sets the FileStream.position to new.

NOTE: If this is a Write stream and Write.isAppending is true, this is silently ignored as data is always written to the end of the File.

Return

The FileStream for chaining operations.

Parameters

new

The new position for the FileStream.

Throws

IllegalArgumentException

If new is less than 0.

If an I/O error occurs, or the stream is closed.

actual abstract fun position(): Long(source)
actual abstract fun position(new: Long): FileStream(source)
actual abstract fun position(): Long(source)
actual abstract fun position(new: Long): FileStream(source)
actual abstract fun position(): Long(source)
actual abstract fun position(new: Long): FileStream(source)