[Overview][Constants][Types][Procedures and functions][Variables][Index] | Reference for unit 'Dos' (#rtl)

# TextRec

Record describing Text files

## Declaration

Source position: textrec.inc line 29

`type TextRec = packed record`
`Handle: THandle;` |  | File handle
`Mode: LongInt;` |  | File open mode
`bufsize: SizeInt;` |  | Size of buffer
`_private: SizeInt;` |  | For internal use only
`bufpos: SizeInt;` |  | buffer start position
`bufend: SizeInt;` |  | buffer end position
`bufptr: ;` |  | Pointer to buffer
`openfunc: pointer;` |  | File open function
`inoutfunc: pointer;` |  | File IO function
`flushfunc: pointer;` |  | Data flush function
`closefunc: pointer;` |  | File close function
`UserData: array [1..32] of Byte;` |  | User data (reserved)
`name: array [0..textrecnamelength-1] of Char;` |  | File name
`LineEnd: TLineEndStr;` |  | Line ending in use
`buffer: TextBuf;` |  | Standard buffer
`end;`

## Description

TextRec describes the internal working of a Text file.

Remark that this is not binary compatible with the Turbo Pascal definition of TextRec, since the sizes of the different fields are different.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.