Write a blob to any output device
LOADLIB "wh::system.whlib"; BOOLEAN FUNCTION SendBlobTo(INTEGER outputid, BLOB data)
Output device to write the data to. The value 0 writes it to the standard output (the same output as @italic Print)
The blob to write
True if the data was written succesfully, false if an I/O error occured.
This function writes the content of a blob to any output device, eg. another open blob-stream, a file or a network connection.
//Creates a combined BLOB from file1.txt and file2.txt BLOB file1 := GetDiskResource("/tmp/file1.txt"); BLOB file2 := GetDiskResource("/tmp/file2.txt"); INTEGER mergestream := CreateStream(); SendBlobTo(mergestream, file1); PrintTo(mergestream,"-- Above was file1, file2 follows now --"); SendBlobTo(mergestream, file2); BLOB file1_and_2_together := MakeBlobFromStream(mergestream);