GetStreamLength
(Engine-Level Function)
Description: | Returns the present length of a stream in bytes. |
Returns: | Numeric |
Usage: | Script or steady state. |
Function Groups: | Stream and Socket |
Related to: | BuffStream | ClientSocket | FileSize | FileStream | PipeStream | Seek | ServerSocket | StreamEnd |
Format: | GetStreamLength(Stream) |
Parameters: |
Stream |
Required. Any expression that returns a stream value. |
Comments: |
This function is useful in determining the size in bytes (not necessarily in characters) of an existing stream. It is not necessary to do a Seek prior to executing the GetStreamLength. Note that, when running in steady-state and monitoring a SerialStream, GetStreamLength does not return an up-to-date stream length for that SerialStream. |
Example:
SLength = GetStreamLength(BuffStream("abcde"));
SLength will be set to 5.