Difference between revisions of "File.streamout"

From OpenEUO
Jump to: navigation, search
m (Calling Pattern)
m (Description)
 
Line 13: Line 13:
 
== Description ==
 
== Description ==
  
The streamout method writes the raw (binary) contents of a string from the current cursor position to the file and updates the current position.   
+
The streamout method writes the raw (binary) contents of a string from the current cursor position to the file and updates the current position.  Streamout returns true if the write is successful.
  
 
== Upon Error ==
 
== Upon Error ==

Latest revision as of 15:21, 18 December 2010

Calling Pattern

Call

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

Argument

c is a string

Results

r is a boolean

Description

The streamout method writes the raw (binary) contents of a string from the current cursor position to the file and updates the current position. Streamout returns true if the write is successful.

Upon Error

Streamout returns false if the file handling object is finalized or the underlying file is otherwise unopened, opened in read mode, or if structured data has been written to the file. Any other error will be handled according to the operant error redirection mode.

See Also