RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomLocateFileService.GetFileStream Method

Returns a stream object from which to read a specified file.

Pascal
function GetFileStream(const AFileName: string; out AOwned: Boolean): TStream; virtual;
C++
virtual __fastcall TStream GetFileStream(const AnsiString AFileName, Boolean AOwned);

The GetTemplateStream method calls GetFileStream internally to obtain the stream it returns when the requested file maps to a fully-qualified path name. 

AFileName is the fully-qualified name of a file whose contents can be read from the returned stream. 

AOwned indicates whether the caller should free the stream after reading the file contents. When AOwned returns true, the caller should free the stream object. When AOwned returns false, the caller should not free the stream object. 

GetFileStream returns a stream object from which to read the contents of AFileName. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!