TFileReader.Create constructor
Create a new instance of
TFileReader for a disk file.
Declaration
constructor Create(const AFileName: TFileName; AMode: Word;
ARights: Cardinal; ABufferSize: Integer); virtual
constructor Create(const AFileName: TFileName; AMode: Word;
ABufferSize: Integer); virtual
constructor Create(const AFileName: TFileName; ABufferSize: Integer)
; virtual
constructor Create(const AFileName: TFileName); virtualArguments
AFileName | Filename of file to open. |
AMode | Mode in which to open the file. |
ARights | Not used. |
ABufferSize | Size of buffer to use when reading. |
Description
Create initializes a
TFileReader using the provided
AFileName.
It will allocate a buffer of
ABufferSize bytes for faster reading
of data.
If no buffer size is specified,
BUFFER_SIZE will be used.
If the
ABufferSize argument is less than
MIN_BUFFER_SIZE, then
MIN_BUFFER_SIZE bytes will be used.
The AMode can be used to specify the mode in which to open the file.
This is one of the fmOpenRead and fmShare* constants
which can be used in a TFileStream constructor. The file must be
opened for reading.
Errors
If
AStream is
Nil, an
EArgumentException exception will be raised.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
