Wikia

Delphi Programming

TFileStream Class

Talk0
2,909pages on
this wiki
This page is intended as a supplement to the official documentation on Delphi programming. CodeGear is in the process of putting the Delphi documentation on the Web. Once they have done so, this page will link to the relevant page in the official documentation.
Stub
This article is a stub.
Please help enhance the Delphi Programming Wiki by expanding it.
Info
see the VCL Documentation Guidelines for an overview on doc pages

UnitEdit

HierarchyEdit

DescriptionEdit

TFileStream class is descendant of THandleStream for manipulating file data. This class introduces methods from THandleStream and some properties.

Technical CommentsEdit

(Known issues / Documentation clarifications / Things to be aware of)

ExamplesEdit

To load a file name c:\mydata.dat for read access into stream and then read 4 bytes from beginning of file into a variable.

 var
   afile_st : TFileStream;
   temp_data: cardinal;
 ...
 afile_st:=TFileStream.Create('c:\mydata.dat',fmOpenRead);
 try
   //make sure file pointer is on beginning of file
   afile_st.Seek(0,soFromBeginning); 
   //read buffer
   afile_st.ReadBuffer(temp_data,4);
 finally
   afile_st.Free;
 end;

See AlsoEdit

User Comments/TipsEdit

(Please leave your name with your comment.)

Around Wikia's network

Random Wiki