Class: TCardStream
TStream ----+
|
TCardStream
Description:
TCardStream is a TStream descendant that can be used to access
(binary) files on the BasicCard.
It will raise an ECardStreamError if something goes wrong.
See Also:
TStream documentation in Delphi help files
Unit:
ZCDCI1
(ZCDCI1.pas)
Constructors:
-
constructor Create(Card: TBasicCard; FileName: String; Mode: Byte);
-
Opens a file on the BasicCard
Properties:
-
property FileNum: Word read fFileNum;
Methods:
-
destructor Destroy; override;
-
Closes the file
-
function EOF: Boolean;
-
Returns true if EOF has been reached
-
function Read(var Buffer; Count: Longint): Longint; override;
-
Reads from file
-
function Seek(Offset: Longint; Origin: Word): Longint; override;
-
Sets new file position
-
function Write(const Buffer; Count: Longint): Longint; override;
-
Writes to file
constructor Create(Card: TBasicCard; FileName: String; Mode: Byte);
- Opens a file on the BasicCard
- Parameters
-
Card
: The initialised and connected BasicCard object -
FileName
: The name of the file -
Mode
: The file mode (just read and/or write, access is always set to binary
property FileNum: Word read fFileNum;
destructor Destroy; override;
- Closes the file
function EOF: Boolean;
- Returns true if EOF has been reached
function Read(var Buffer; Count: Longint): Longint; override;
- Reads from file
- See Also
- TStream.Read documentation
function Seek(Offset: Longint; Origin: Word): Longint; override;
- Sets new file position
- See Also
- TStream.Seek documentation
function Write(const Buffer; Count: Longint): Longint; override;
- Writes to file
- See Also
- TStream.Write documentation