Class TReadFile

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TReadFile = class(TReferenceCounted)

Description

Interface providing read acess to a file.

Hierarchy

Overview

Methods

Public function Read(var Buffer; Size: LongWord): LongInt;
Public function Seek(Dest: LongType; Relative: Boolean=False): Boolean; inline;

Properties

Public property FileName: StringType read GetFileName;
Public property Position: LongType read GetPos write SetPos;
Public property Size: LongType read GetSize;

Description

Methods

Public function Read(var Buffer; Size: LongWord): LongInt;

Reads a block of memory.

Parameters
Buffer
Buffer where read bytes are written to.
Size
Number of bytes to read from the file.
Returns

The number of bytes actually read.

Public function Seek(Dest: LongType; Relative: Boolean=False): Boolean; inline;

Changes position in file.

Parameters
FinalPos
Destination position in the file.
RelativeMovement
If set to true, the position in the file is changed relative to current position. Otherwise the position is changed from beginning of file.
Returns

True if successful, otherwise false.

Properties

Public property FileName: StringType read GetFileName;

The opened file's name.

Public property Position: LongType read GetPos write SetPos;

The current psition of the file pointer.

Public property Size: LongType read GetSize;

The file's size in bytes.


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22