The stream methods are only available for the LocalProvider currently.
stream
Returns a Java stream of the file using non-blocking IO classes. The stream will represent every line in the file so you can navigate through it.
/** * @path The path to read all the files with * * @return Stream object: See https://apidocs.ortussolutions.com/coldbox-modules/cbstreams/1.1.0/index.html */functionstream( required path );// Exampledisk.stream( expandPath( "datadump.txt" ) );
streamOf
Create a Java stream of the incoming array of files or directories.
/** * @target The target array of files/directories to generate a stream of * * @return Stream object: See https://apidocs.ortussolutions.com/coldbox-modules/cbstreams/1.1.0/index.html */functionstreamOf( required array target ){// Exampledisk.streamOf( disk.files( "my.path" ) ).filter( function( item ){returnitem.startsWith( "a" ); } ).forEach( function( item ){writedump( item ); } );