TDosStream
[Properties (by Name)][Methods (by Name)][Events (by Name)]
DOS file stream
Declaration
Source position: objects.pp line 345
Type
TDosStream = object (TStream)
Handle : THandle;
FName : AsciiZ;
constructor Init(FileName: FNameStr; Mode: Word);
destructor Done; Virtual;
procedure Close; Virtual;
procedure Truncate; Virtual;
procedure Seek(Pos: LongInt); Virtual;
procedure Open(OpenMode: Word); Virtual;
procedure Read(var Buf; Count: LongInt); Virtual;
procedure Write(var Buf; Count: LongInt); Virtual;
private
FileInfo : File;
end
;
Description
TDosStream is a stream that stores it's contents in a file. it overrides a couple of methods of TStream for this.
In addition to the fields inherited from TStream (see TStream ), there are some extra fields, that describe the file. (mainly the name and the OS file handle)
No buffering in memory is done when using TDosStream. All data are written directly to the file. For a stream that buffers in memory, see TBufStream .
Members
Member | Type | Visibility | Description |
---|---|---|---|
Close | Method | default | Close the file. |
Done | Method | default | Closes the file and cleans up the instance. |
FileInfo | Field | private | |
FName | Field | default | File name |
Handle | Field | default | OS file handle for stream |
Init | Method | default | Instantiate a new instance of TDosStream. |
Open | Method | default | Open the file stream |
Read | Method | default | Read data from the stream to a buffer. |
Seek | Method | default | Set file position. |
Truncate | Method | default | Truncate the file on the current position. |
Write | Method | default | Write data from a buffer to the stream. |
Inheritance
Class | Description |
---|---|
TDosStream | DOS file stream |