Difference between revisions of "File.stream"

From OpenEUO
Jump to: navigation, search
(Created page with "== 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 ...")
 
m (See Also)
 
Line 27: Line 27:
  
 
* [[file.reopen]]
 
* [[file.reopen]]
 +
 +
* [[file.streamout]]

Latest revision as of 16:22, 18 December 2010

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