Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
/img/help/home.gif

TECLBaseStream.LoadFromFile

TECLBaseStream


Loads the entire contents of a file into the current stream.

 

procedure LoadFromFile(const FileName: string);

 

Description

Use LoadFromFile to fill the stream with the contents of a file. Pass the name of the file as the FileName parameter. LoadFromFile allows an application to read the contents of a file into the stream without having to explicitly create and free a file stream object.

 

LoadFromFile resets the size of the current stream so that the contents of the file will fit exactly. It sets the Size property accordingly, and then reads the entire contents of the file into the stream. Thus, LoadFromFile will discard any pre-existing data stored in the current stream.

 

Note:      We recommend that you use the LoadFromFile instead of the CopyFrom method with TFileStream as it works much faster.

        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Nov 22, 2024