TStrings.SaveToFile procedure
Save the contents of the list to a file.
Declaration
procedure SaveToFile(const FileName: string); virtual; overload
procedure SaveToFile(const FileName: string; IgnoreEncoding: Boolean)
; overload
procedure SaveToFile(const FileName: string; AEncoding: TEncoding)
; virtual; overloadDescription
SaveToFile saves the contents of the stringlist to the file with
name
FileName. It writes the strings to the file, separated by
end-of-line markers, so each line in the file will contain 1 string from the
stringlist.
SaveToFile creates a
file stream
with name
FileName, calls
SaveToStream
and then destroys the file stream object.
Errors
An
EStreamError exception can be raised if the file
FileName cannot be opened,
or if it cannot be written to.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
