Sign in Join
FPDoc Onlineexperiment

TBufStream.Init constructor

Member of TBufStreamIn unit Objects

Initialize an instance of TBufStream and open the file.

Declaration

pascal
constructor Init(FileName: FNameStr; Mode: Word; Size: Word)

Description

Init instantiates an instance of TBufStream. The name of the file that contains (or will contain) the data of the stream is given in FileName. The Mode parameter determines whether a new file should be created and what access rights you have on the file. It can be one of the following constants:

stCreate
Creates a new file.
stOpenRead
Read access only.
stOpenWrite
Write access only.
stOpen
Read and write access.

The Size parameter determines the size of the buffer that will be created. It should be different from zero.

For an example see Flush.

Errors

On error, Status is set to stInitError, and ErrorInfo is set to the dos error code.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.