TIlabFStream

Declaration: TIlabFStream = class(TILabFStream)
TIlabFStream will open a named file and provide methods to read from or write to it. In contrast to the class TFileStream the class TIlabFStream supports mixed mode files (binary and readable parts mixed). The following list provides the most important properties and methods of the TIlabFStream class:

Sample
program:
The following short program shows how to read a text file line by line. The read lines are displayed in the console window:
program ReadTextFile;

var
  i              : integer;
  FName          : string;
  fs             : TIlabFStream;
  astr           : string;

begin
FName := SelectFile (GetILabDir(idWork), '*.txt', 'Select a file');
if FName <> '' then
  begin
  fs := TIlabFStream.Create (FName, fmOpenRead);
  while not fs.Eos do
    begin
    astr := fs.ReadLn(0);
    couts (astr);
    end;
  fs.Free;
  end;
end.