TStreamFactory: Methods  


Stream factories are used by the OpenStream, ReadStream and WriteStream functions to create streams based on a 'url object'.

Url objects are usually strings, in which case the url is divided into 2 parts - a protocol and a path. These are separated by a double colon string - "::".

To create your own stream factories, you should extend the TStreamFactory type and implement the CreateStream method.

To install your stream factory, simply create an instance of it using 'New'.

Methods

CreateStreamCreate a stream based on a url object

Method reference

Method CreateStream:TStream( url:Object,proto$,path$,readable,writeable ) Abstract
DescriptionCreate a stream based on a url object
Information Types which extends TStreamFactory must implement this method.

url contains the original url object as supplied to OpenStream, ReadStream or WriteStream.

If url is a string, proto contains the url protocol - for example, the "incbin" part of "incbin::myfile".

If url is a string, path contains the remainder of the url - for example, the "myfile" part of "incbin::myfile".

If url is not a string, both proto and path will be Null.