help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Classes' (#rtl)

TStrings.LoadFromFile

Load the contents of a file as a series of strings.

Declaration

Source position: classesh.inc line 505

public procedure TStrings.LoadFromFile(

  const FileName: String

); virtual;

Description

LoadFromFile loads the contents of a file into the stringlist. Each line in the file (as marked by the end-of-line marker of the particular OS the application runs on) becomes one string in the stringlist. This action replaces the contents of the stringlist, it does not append the strings to the current content.

LoadFromFile simply creates a file stream with the given filename, and then executes TStrings.LoadfromStream; after that the file stream object is destroyed again.

See also

TStrings.LoadFromStream

  

Load the contents of a stream as a series of strings.

TStrings.SaveToFile

  

Save the contents of the list to a file.

Tstrings.SaveToStream

  

Save the contents of the string to a stream.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505