GlobalBinaryStream write to file on server
I have a process which is passed a .rtf within a GlobalBinaryStream. I am trying to then output just the .rtf to a folder on a server, but not even sure where to start.
Is there a Built in Operation that I can pass the GlobalBinaryStream to which will then write the file to a folder, or do I need to use a custom class for the operation?
Thanks
Discussion (2)0
Comments
Working with Streams
E.g.
;s stream=##class(%GlobalBinaryStream).%New()
;d stream.Write("--------")
s file=##class(%Stream.FileBinary).%New()
s file.Filename="C:\temp\test.txt"
d file.CopyFromAndSave(stream)Thank you Vitaliy, not sure how I missed that in the documentation!