Skip to content

Modern Fs Stream ReadToEnd

Paul Squires edited this page Oct 22, 2026 · 3 revisions

Home › Filesystem › File Streams › Stream.ReadToEnd

Stream.ReadToEnd

Appends every remaining byte to an Array; returns how many.

Syntax

Stream.ReadToEnd( buf )

Notes

  • Reads from the position to the end and APPENDS the bytes to buf, an Array( of ubyte ). Returns the number appended.

Examples

#import "std/fs"
#import "std/containers"
using fs

dim as MemoryStream m = MemoryStream( "abc" )
dim as containers.Array( of ubyte ) b
print m.ReadToEnd( b ).Value( ), b.Count( )    '' 3 3

Library: Filesystem Library Category: File Streams Documented under: Streams

Clone this wiki locally