Class TCabinetFileHandler (unit Cabinet)

Inherits from

TComponent

Classes } { TCabinetFileHandler abstract class -- represents a cabinet-associated file handler. The class is used for reading source files (when compressing), for writing destination files (when decompressing) and for reading and writing to the cabinet file being processed The methods mimick the behaviour of the C run-time library I/O API (_open, _close, etc.) and must be implemented to accomodate these aspects. The API has been augmented with an Win32 error code which is returned to the FCI and FDI interfaces if they are filled in. Open Open a file and return its file handle. The FileType parameter specifies the type of file to open: source, destination or cabinet. Read Read from an opened file. Write Write to an opened file. Close Close an opened file. Seek Seek to a position in an opened file. Delete Delete a file.

Constructors



Functions

function Close (FileHandle : Integer; var Error : Integer) : Integer;


function Delete (const FileName : string; var Error : Integer) : Integer;


function Open (const FileName : string; OpenFlag, OpenMode : Integer; var Error : Integer; FileType : TFileType) : Integer;


function Read (FileHandle : Integer; var Buffer; Count : Integer; var Error : Integer) : Integer;


function Seek (FileHandle : Integer; Distance : Longint; SeekType : Integer; var Error : Integer) : Integer;


function Write (FileHandle : Integer; var Buffer; Count : Integer; var Error : Integer) : Integer;


Properties

Events

Variables


Constructors


Functions


function Close (FileHandle : Integer; var Error : Integer) : Integer;


function Delete (const FileName : string; var Error : Integer) : Integer;


function Open (const FileName : string; OpenFlag, OpenMode : Integer; var Error : Integer; FileType : TFileType) : Integer;


function Read (FileHandle : Integer; var Buffer; Count : Integer; var Error : Integer) : Integer;


function Seek (FileHandle : Integer; Distance : Longint; SeekType : Integer; var Error : Integer) : Integer;


function Write (FileHandle : Integer; var Buffer; Count : Integer; var Error : Integer) : Integer;


Properties


Events


Variables