TempFileStream

(Engine-Level Function)

Description: Creates a temporary file on disk and connects a stream to the temporary file. The temporary file is removed when the stream is closed or no longer referenced or if the VTScada process is terminated.
Returns: Stream
Usage: Script or steady state.
Function Groups: File I/O,  Stream and Socket
Related to: BlockWrite | BuffStream | ClientSocket | CloseStream | FileStream | GetStreamLength | PipeStream | SRead | StreamEnd | SWrite
Format: TempFileStream(Buffer)
Parameters:  
Buffer
Required. Any text or buffer expression. This serves as the initial content of the stream.
Comments: This function returns a stream connected to a temporary disk file with the contents of Buffer, which is the pointer at which an action (read or write) begins will be at the start of the stream. Writing to this stream can overwrite or expand (or both,) the size of this initial stream and file.

Example:

Stream = TempFileStream("0123456789");

The variable stream would contain "0123456789".