System.Classes.TCustomMemoryStream.SaveToFile

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SaveToFile(const FileName: string);

C++

void __fastcall SaveToFile(const System::UnicodeString FileName);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Classes.pas
System.Classes.hpp
System.Classes TCustomMemoryStream

Description

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

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. In case the file already exists, the current file contents will be completely replaced with the new. If the named file cannot be created or opened, SaveToFile raises an EFCreateError exception.

See Also