help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

TextRec

Record describing a text file type

Declaration

Source position: textrec.inc line 29

type TextRec = packed record

  Handle: THandle;

  

Operating system handle for file.

  Mode: LongInt;

  

Open mode

  bufsize: SizeInt;

  

Size of buffer.

  _private: SizeInt;

  

Private data. Do not use.

  bufpos: SizeInt;

  

Current buffer position.

  bufend: SizeInt;

  

Current buffer end.

  bufptr: ;

  

Pointer to current buffer.

  openfunc: pointer;

  

File open function. Allocates handle.

  inoutfunc: pointer;

  

Read/write function

  flushfunc: pointer;

  

Flush buffer function

  closefunc: pointer;

  

Close handle function.

  UserData: array [1..32] of Byte;

  

User data for text rec.

  name: array [0..textrecnamelength-1] of Char;

  

File name

  LineEnd: TLineEndStr;

  

Line ending used when writing to this text file.

  buffer: TextBuf;

  

Default buffer.

end;

Description

TextRec describes a text file. This record is made available so it can be used to implement drivers for other than the normal file system file records.

To implement a driver, an Assign procedure must be implemented, which fills in the various fields of the record. Most notably, the callback functions must be filled in appropriately. After this, the normal file operations will handle all necessary calls to the various callbacks.

See also

TTextRec

  

Record describing a text file.

TFileRec

  

Record describing an untyped file.

FileRec

  

Record describing an untyped file.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505