Constructor for the class instance.
Source position: bufstream.pp line 134
public constructor TBufferedFileStream.Create( |
const AFileName: string; |
Mode: Word |
); |
const AFileName: string; |
Mode: Word; |
Rights: Cardinal |
); |
AFileName |
|
File name with the content for the buffered file stream. |
Mode |
|
File mode used to open the file. |
AFileName |
|
File name with the content for the buffered file stream. |
Mode |
|
File mode used to open the file. |
Rights |
|
File rights used to open the file. |
Create is the constructor for the class instance. Overloaded variants are provided to match the constructors used in the ancestor class (TFileStream).
Create ensures that resources are allocated for the internal buffer. By default, the buffer reserves 8 blocks (pages) with 4,096 bytes per block (page). Create calls InitializeCache to allocate resources needed for the internal buffer.
Create calls the inherited constructor using the parameter values passed to the method.
AFileName is the qualified path to the file where the content in the stream is stored.
Mode contains the file mode used for the file handle in the ancestor class. It uses the following file mode constant values:
The file mode constants (except for fmCreate) can be OR'd with sharing mode constants, including:
Rights contains the value used as the file mode on UNIX-like file systems. It contains a value representing the read, write, execute, sticky-bit, setgid, and setuid flags used on the platform. It is ignored for all other platforms, and is significant only when using fmCreate in Mode.
The Size for the internal buffer is updated to use the length of the file stream.
|
Re-initializes the internal buffer for the buffered file stream. |
|
TBufferedFileStream.Size |
||
TFileStream.Size |