RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomMemoryStream.SaveToFile Method

Writes the entire contents of the memory stream to the file with a given file name.

Pascal
procedure SaveToFile(const FileName: string);
C++
__fastcall SaveToFile(const AnsiString FileName);

Use SaveToFile to write the contents of Memory to a file. SaveToFile allows an application to write out the contents of the memory stream without having to explicitly create and free a file stream object. If the named file cannot be created or opened, SaveToFile raises an EFCreateError exception. 

 

EFcreateError 

Memory 

SaveToStream 

TFileStream

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!