The File Attribute constants are used in FindFirst (86), FindNext (87) to determine what type of special file to search for in addition to normal files. These flags are also used in the SetFAttr (98) and GetFAttr (90) routines to set and retrieve attributes of files. For their definitions consult table (2.1).
|
These constants are used in the Mode field of the TextRec record. Gives information on the filemode of the text I/O. For their definitions consult table (2.2).
|
The following constants are not portable, and should not be used. They are present for compatibility only.
{Bitmasks for CPU Flags} fcarry = $0001; fparity = $0004; fauxiliary = $0010; fzero = $0040; fsign = $0080; foverflow = $0800; |
ComStr = String[255]; { For command-lines } PathStr = String[255]; { For full path for file names } DirStr = String[255]; { For Directory and (DOS) drive string } NameStr = String[255]; { For Name of file } ExtStr = String[255]; { For Extension of file } |
SearchRec = Packed Record Fill : array[1..21] of byte; { Fill replaced with declarations below, for Linux} Attr : Byte; {attribute of found file} Time : LongInt; {last modify date of found file} Size : LongInt; {file size of found file} Reserved : Word; {future use} Name : String[255]; {name of found file} SearchSpec: String[255]; {search pattern} NamePos: Word; {end of path, start of name position} End; |
SearchNum: LongInt; {to track which search this is} SearchPos: LongInt; {directory position} DirPtr: LongInt; {directory pointer for reading directory} SearchType: Byte; {0=normal, 1=open will close} SearchAttr: Byte; {attribute we are searching for} Fill: Array[1..07] of Byte; {future use} |
const filerecnamelength = 255; type FileRec = Packed Record Handle, Mode, RecSize : longint; _private : array[1..32] of byte; UserData : array[1..16] of byte; name : array[0..filerecnamelength] of char; End; |
const TextRecNameLength = 256; TextRecBufSize = 256; type TextBuf = array[0..TextRecBufSize-1] of char; TextRec = Packed Record Handle, Mode, bufsize, _private, bufpos, bufend : longint; bufptr : ^textbuf; openfunc, inoutfunc, flushfunc, closefunc : pointer; UserData : array[1..16] of byte; name : array[0..textrecnamelength-1] of char; buffer : textbuf; End; |
Registers = record case i : integer of 0 : (ax,f1,bx,f2,cx,f3,dx,f4,bp,f5,si, f51,di,f6,ds,f7,es,f8,flags,fs,gs : word); 1 : (al,ah,f9,f10,bl,bh,f11,f12, cl,ch,f13,f14,dl,dh : byte); 2 : (eax, ebx, ecx, edx, ebp, esi, edi : longint); End; |
DateTime = record Year: Word; Month: Word; Day: Word; Hour: Word; Min: Word; Sec: word; End; |
DosError : integer; |
2 | File not found. |
3 | path not found. |
5 | Access denied. |
6 | Invalid handle. |
8 | Not enough memory. |
10 | Invalid environment. |
11 | Invalid format. |
18 | No more files. |