File.stream

From OpenEUO
Jump to: navigation, search

Calling Pattern

Call

local f = sl.file(a,b)
local r = f.stream()

Results

r is a string

Description

The stream method reads the raw (binary) contents of a file from the current cursor position into the result and updates the current position as the end of file. The result may contain embedded '\0' (null) characters or other non-visible control characters if these were present in the underlying file.

Upon Error

Stream returns nil if the structured file handling object is finalized or the underlying file is otherwise unopened. Any other error will be handled according to the operant error redirection mode.

See Also