Skip to content

RawFile

An open, unbuffered file.

Returned by open and Path.open with buffer: false. Each read and write goes straight to the file.

A raw file is both an iterator and a sink, so it can be used with for, .next(), .put(), and strand.redirect. It yields chunks of bytes, which concatenate back to exactly the file's contents.

Inherits from: Iter[Bin], BaseFile

Methods

(iter)() -> RawFile

Returns the file as its own iterator.

(next)() -> Bin

Reads the next chunk of data, of arbitrary length.

(put) value

Writes a value to the file, as File does.

Parameters

NameTypeDescription
value Value Value to write.

(sink)() -> RawFile

Returns the file as its own sink.