sysutils.pp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Florian Klaempfl
  5. member of the Free Pascal development team
  6. Sysutils unit for win32
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. unit sysutils;
  14. interface
  15. {$MODE objfpc}
  16. { force ansistrings }
  17. {$H+}
  18. uses
  19. dos,windows;
  20. { Include platform independent interface part }
  21. {$i sysutilh.inc}
  22. type
  23. THandle = Windows.Handle;
  24. TSystemTime = Windows.TSystemTime;
  25. EWin32Error = class(Exception)
  26. public
  27. ErrorCode : DWORD;
  28. end;
  29. Var
  30. Win32Platform : Longint;
  31. implementation
  32. { Include platform independent implementation part }
  33. {$i sysutils.inc}
  34. {****************************************************************************
  35. File Functions
  36. ****************************************************************************}
  37. Function FileOpen (Const FileName : string; Mode : Integer) : Longint;
  38. const
  39. AccessMode: array[0..2] of Cardinal = (
  40. GENERIC_READ,
  41. GENERIC_WRITE,
  42. GENERIC_READ or GENERIC_WRITE);
  43. ShareMode: array[0..4] of Integer = (
  44. 0,
  45. 0,
  46. FILE_SHARE_READ,
  47. FILE_SHARE_WRITE,
  48. FILE_SHARE_READ or FILE_SHARE_WRITE);
  49. Var
  50. FN : string;
  51. begin
  52. FN:=FileName+#0;
  53. result := CreateFile(@FN[1], dword(AccessMode[Mode and 3]),
  54. dword(ShareMode[(Mode and $F0) shr 4]), nil, OPEN_EXISTING,
  55. FILE_ATTRIBUTE_NORMAL, 0);
  56. end;
  57. Function FileCreate (Const FileName : String) : Longint;
  58. Var
  59. FN : string;
  60. begin
  61. FN:=FileName+#0;
  62. Result := CreateFile(@FN[1], GENERIC_READ or GENERIC_WRITE,
  63. 0, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
  64. end;
  65. Function FileCreate (Const FileName : String; Mode:longint) : Longint;
  66. begin
  67. FileCreate:=FileCreate(FileName);
  68. end;
  69. Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
  70. Var
  71. res : dword;
  72. begin
  73. if ReadFile(Handle, Buffer, Count, res, nil) then
  74. FileRead:=Res
  75. else
  76. FileRead:=-1;
  77. end;
  78. Function FileWrite (Handle : Longint; const Buffer; Count : Longint) : Longint;
  79. Var
  80. Res : dword;
  81. begin
  82. if WriteFile(Handle, Buffer, Count, Res, nil) then
  83. FileWrite:=Res
  84. else
  85. FileWrite:=-1;
  86. end;
  87. Function FileSeek (Handle,FOffset,Origin : Longint) : Longint;
  88. begin
  89. Result := longint(SetFilePointer(Handle, FOffset, nil, Origin));
  90. end;
  91. Function FileSeek (Handle : Longint; FOffset,Origin : Int64) : Int64;
  92. begin
  93. {$warning need to add 64bit call }
  94. Result := longint(SetFilePointer(Handle, FOffset, nil, Origin));
  95. end;
  96. Procedure FileClose (Handle : Longint);
  97. begin
  98. if Handle<=4 then
  99. exit;
  100. CloseHandle(Handle);
  101. end;
  102. Function FileTruncate (Handle,Size: Longint) : boolean;
  103. begin
  104. Result:=longint(SetFilePointer(handle,Size,nil,FILE_BEGIN))<>-1;
  105. If Result then
  106. Result:=SetEndOfFile(handle);
  107. end;
  108. Function DosToWinTime (DTime:longint;Var Wtime : TFileTime):longbool;
  109. var
  110. lft : TFileTime;
  111. begin
  112. DosToWinTime:=DosDateTimeToFileTime(longrec(dtime).hi,longrec(dtime).lo,@lft) and
  113. LocalFileTimeToFileTime(lft,Wtime);
  114. end;
  115. Function WinToDosTime (Var Wtime : TFileTime;var DTime:longint):longbool;
  116. var
  117. lft : FileTime;
  118. begin
  119. WinToDosTime:=FileTimeToLocalFileTime(WTime,lft) and
  120. FileTimeToDosDateTime(lft,Longrec(Dtime).Hi,LongRec(DTIME).lo);
  121. end;
  122. Function FileAge (Const FileName : String): Longint;
  123. var
  124. Handle: THandle;
  125. FindData: TWin32FindData;
  126. begin
  127. Handle := FindFirstFile(Pchar(FileName), @FindData);
  128. if Handle <> INVALID_HANDLE_VALUE then
  129. begin
  130. Windows.FindClose(Handle);
  131. if (FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = 0 then
  132. If WinToDosTime(FindData.ftLastWriteTime,Result) then
  133. exit;
  134. end;
  135. Result := -1;
  136. end;
  137. Function FileExists (Const FileName : String) : Boolean;
  138. var
  139. Handle: THandle;
  140. FindData: TWin32FindData;
  141. begin
  142. Handle := FindFirstFile(Pchar(FileName), @FindData);
  143. Result:=Handle <> INVALID_HANDLE_VALUE;
  144. If Result then
  145. Windows.FindClose(Handle);
  146. end;
  147. Function DirectoryExists (Const Directory : String) : Boolean;
  148. var
  149. Handle: THandle;
  150. FindData: TWin32FindData;
  151. begin
  152. Handle := FindFirstFile(Pchar(Directory), @FindData);
  153. Result:=(Handle <> INVALID_HANDLE_VALUE) and
  154. ((FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY) = FILE_ATTRIBUTE_DIRECTORY);
  155. If Result then
  156. Windows.FindClose(Handle);
  157. end;
  158. Function FindMatch(var f: TSearchRec) : Longint;
  159. begin
  160. { Find file with correct attribute }
  161. While (F.FindData.dwFileAttributes and cardinal(F.ExcludeAttr))<>0 do
  162. begin
  163. if not FindNextFile (F.FindHandle,@F.FindData) then
  164. begin
  165. Result:=GetLastError;
  166. exit;
  167. end;
  168. end;
  169. { Convert some attributes back }
  170. WinToDosTime(F.FindData.ftLastWriteTime,F.Time);
  171. f.size:=F.FindData.NFileSizeLow;
  172. f.attr:=F.FindData.dwFileAttributes;
  173. f.Name:=StrPas(@F.FindData.cFileName);
  174. Result:=0;
  175. end;
  176. Function FindFirst (Const Path : String; Attr : Longint; Var Rslt : TSearchRec) : Longint;
  177. begin
  178. Rslt.Name:=Path;
  179. Rslt.Attr:=attr;
  180. Rslt.ExcludeAttr:=(not Attr) and ($1e);
  181. { $1e = faHidden or faSysFile or faVolumeID or faDirectory }
  182. { FindFirstFile is a Win32 Call }
  183. Rslt.FindHandle:=FindFirstFile (PChar(Path),@Rslt.FindData);
  184. If Rslt.FindHandle=Invalid_Handle_value then
  185. begin
  186. Result:=GetLastError;
  187. exit;
  188. end;
  189. { Find file with correct attribute }
  190. Result:=FindMatch(Rslt);
  191. end;
  192. Function FindNext (Var Rslt : TSearchRec) : Longint;
  193. begin
  194. if FindNextFile(Rslt.FindHandle, @Rslt.FindData) then
  195. Result := FindMatch(Rslt)
  196. else
  197. Result := GetLastError;
  198. end;
  199. Procedure FindClose (Var F : TSearchrec);
  200. begin
  201. if F.FindHandle <> INVALID_HANDLE_VALUE then
  202. Windows.FindClose(F.FindHandle);
  203. end;
  204. Function FileGetDate (Handle : Longint) : Longint;
  205. Var
  206. FT : TFileTime;
  207. begin
  208. If GetFileTime(Handle,nil,nil,@ft) and
  209. WinToDosTime(FT,Result) then
  210. exit;
  211. Result:=-1;
  212. end;
  213. Function FileSetDate (Handle,Age : Longint) : Longint;
  214. Var
  215. FT: TFileTime;
  216. begin
  217. Result := 0;
  218. if DosToWinTime(Age,FT) and
  219. SetFileTime(Handle, ft, ft, FT) then
  220. Exit;
  221. Result := GetLastError;
  222. end;
  223. Function FileGetAttr (Const FileName : String) : Longint;
  224. begin
  225. Result:=GetFileAttributes(PChar(FileName));
  226. end;
  227. Function FileSetAttr (Const Filename : String; Attr: longint) : Longint;
  228. begin
  229. if not SetFileAttributes(PChar(FileName), Attr) then
  230. Result := GetLastError
  231. else
  232. Result:=0;
  233. end;
  234. Function DeleteFile (Const FileName : String) : Boolean;
  235. begin
  236. DeleteFile:=Windows.DeleteFile(Pchar(FileName));
  237. end;
  238. Function RenameFile (Const OldName, NewName : String) : Boolean;
  239. begin
  240. Result := MoveFile(PChar(OldName), PChar(NewName));
  241. end;
  242. {****************************************************************************
  243. Disk Functions
  244. ****************************************************************************}
  245. function GetDiskFreeSpace(drive:pchar;var sector_cluster,bytes_sector,
  246. freeclusters,totalclusters:longint):longbool;
  247. external 'kernel32' name 'GetDiskFreeSpaceA';
  248. type
  249. TGetDiskFreeSpaceEx = function(drive:pchar;var availableforcaller,total,free):longbool;stdcall;
  250. var
  251. GetDiskFreeSpaceEx : TGetDiskFreeSpaceEx;
  252. function diskfree(drive : byte) : int64;
  253. var
  254. disk : array[1..4] of char;
  255. secs,bytes,
  256. free,total : longint;
  257. qwtotal,qwfree,qwcaller : int64;
  258. begin
  259. if drive=0 then
  260. begin
  261. disk[1]:='\';
  262. disk[2]:=#0;
  263. end
  264. else
  265. begin
  266. disk[1]:=chr(drive+64);
  267. disk[2]:=':';
  268. disk[3]:='\';
  269. disk[4]:=#0;
  270. end;
  271. if assigned(GetDiskFreeSpaceEx) then
  272. begin
  273. if GetDiskFreeSpaceEx(@disk,qwcaller,qwtotal,qwfree) then
  274. diskfree:=qwfree
  275. else
  276. diskfree:=-1;
  277. end
  278. else
  279. begin
  280. if GetDiskFreeSpace(@disk,secs,bytes,free,total) then
  281. diskfree:=int64(free)*secs*bytes
  282. else
  283. diskfree:=-1;
  284. end;
  285. end;
  286. function disksize(drive : byte) : int64;
  287. var
  288. disk : array[1..4] of char;
  289. secs,bytes,
  290. free,total : longint;
  291. qwtotal,qwfree,qwcaller : int64;
  292. begin
  293. if drive=0 then
  294. begin
  295. disk[1]:='\';
  296. disk[2]:=#0;
  297. end
  298. else
  299. begin
  300. disk[1]:=chr(drive+64);
  301. disk[2]:=':';
  302. disk[3]:='\';
  303. disk[4]:=#0;
  304. end;
  305. if assigned(GetDiskFreeSpaceEx) then
  306. begin
  307. if GetDiskFreeSpaceEx(@disk,qwcaller,qwtotal,qwfree) then
  308. disksize:=qwtotal
  309. else
  310. disksize:=-1;
  311. end
  312. else
  313. begin
  314. if GetDiskFreeSpace(@disk,secs,bytes,free,total) then
  315. disksize:=int64(total)*secs*bytes
  316. else
  317. disksize:=-1;
  318. end;
  319. end;
  320. Function GetCurrentDir : String;
  321. begin
  322. GetDir(0, result);
  323. end;
  324. Function SetCurrentDir (Const NewDir : String) : Boolean;
  325. begin
  326. {$I-}
  327. ChDir(NewDir);
  328. {$I+}
  329. result := (IOResult = 0);
  330. end;
  331. Function CreateDir (Const NewDir : String) : Boolean;
  332. begin
  333. {$I-}
  334. MkDir(NewDir);
  335. {$I+}
  336. result := (IOResult = 0);
  337. end;
  338. Function RemoveDir (Const Dir : String) : Boolean;
  339. begin
  340. {$I-}
  341. RmDir(Dir);
  342. {$I+}
  343. result := (IOResult = 0);
  344. end;
  345. {****************************************************************************
  346. Time Functions
  347. ****************************************************************************}
  348. Procedure GetLocalTime(var SystemTime: TSystemTime);
  349. Var
  350. Syst : Windows.TSystemtime;
  351. begin
  352. windows.Getlocaltime(@syst);
  353. SystemTime.year:=syst.wYear;
  354. SystemTime.month:=syst.wMonth;
  355. SystemTime.day:=syst.wDay;
  356. SystemTime.hour:=syst.wHour;
  357. SystemTime.minute:=syst.wMinute;
  358. SystemTime.second:=syst.wSecond;
  359. SystemTime.millisecond:=syst.wMilliSeconds;
  360. end;
  361. {****************************************************************************
  362. Misc Functions
  363. ****************************************************************************}
  364. procedure Beep;
  365. begin
  366. MessageBeep(0);
  367. end;
  368. {****************************************************************************
  369. Locale Functions
  370. ****************************************************************************}
  371. Procedure InitAnsi;
  372. Var
  373. i : longint;
  374. begin
  375. { Fill table entries 0 to 127 }
  376. for i := 0 to 96 do
  377. UpperCaseTable[i] := chr(i);
  378. for i := 97 to 122 do
  379. UpperCaseTable[i] := chr(i - 32);
  380. for i := 123 to 191 do
  381. UpperCaseTable[i] := chr(i);
  382. Move (CPISO88591UCT,UpperCaseTable[192],SizeOf(CPISO88591UCT));
  383. for i := 0 to 64 do
  384. LowerCaseTable[i] := chr(i);
  385. for i := 65 to 90 do
  386. LowerCaseTable[i] := chr(i + 32);
  387. for i := 91 to 191 do
  388. LowerCaseTable[i] := chr(i);
  389. Move (CPISO88591LCT,UpperCaseTable[192],SizeOf(CPISO88591UCT));
  390. end;
  391. function GetLocaleStr(LID, LT: Longint; const Def: string): ShortString;
  392. var
  393. L: Integer;
  394. Buf: array[0..255] of Char;
  395. begin
  396. L := GetLocaleInfo(LID, LT, Buf, SizeOf(Buf));
  397. if L > 0 then
  398. SetString(Result, @Buf[0], L - 1)
  399. else
  400. Result := Def;
  401. end;
  402. function GetLocaleChar(LID, LT: Longint; Def: Char): Char;
  403. var
  404. Buf: array[0..1] of Char;
  405. begin
  406. if GetLocaleInfo(LID, LT, Buf, 2) > 0 then
  407. Result := Buf[0]
  408. else
  409. Result := Def;
  410. end;
  411. Function GetLocaleInt(LID,TP,Def: LongInt): LongInt;
  412. Var
  413. S: String;
  414. C: Integer;
  415. Begin
  416. S:=GetLocaleStr(LID,TP,'0');
  417. Val(S,Result,C);
  418. If C<>0 Then
  419. Result:=Def;
  420. End;
  421. procedure GetFormatSettings;
  422. var
  423. HF : Shortstring;
  424. LID : LCID;
  425. I,Day,DateOrder : longint;
  426. begin
  427. LID := GetThreadLocale;
  428. { Date stuff }
  429. for I := 1 to 12 do
  430. begin
  431. ShortMonthNames[I]:=GetLocaleStr(LID,LOCALE_SABBREVMONTHNAME1+I-1,ShortMonthNames[i]);
  432. LongMonthNames[I]:=GetLocaleStr(LID,LOCALE_SMONTHNAME1+I-1,LongMonthNames[i]);
  433. end;
  434. for I := 1 to 7 do
  435. begin
  436. Day := (I + 5) mod 7;
  437. ShortDayNames[I]:=GetLocaleStr(LID,LOCALE_SABBREVDAYNAME1+Day,ShortDayNames[i]);
  438. LongDayNames[I]:=GetLocaleStr(LID,LOCALE_SDAYNAME1+Day,LongDayNames[i]);
  439. end;
  440. DateSeparator := GetLocaleChar(LID, LOCALE_SDATE, '/');
  441. DateOrder := GetLocaleInt(LID, LOCALE_IDate, 0);
  442. Case DateOrder Of
  443. 1: Begin
  444. ShortDateFormat := 'dd/mm/yyyy';
  445. LongDateFormat := 'dddd, d. mmmm yyyy';
  446. End;
  447. 2: Begin
  448. ShortDateFormat := 'yyyy/mm/dd';
  449. LongDateFormat := 'dddd, yyyy mmmm d.';
  450. End;
  451. else
  452. // Default american settings...
  453. ShortDateFormat := 'mm/dd/yyyy';
  454. LongDateFormat := 'dddd, mmmm d. yyyy';
  455. End;
  456. { Time stuff }
  457. TimeSeparator := GetLocaleChar(LID, LOCALE_STIME, ':');
  458. TimeAMString := GetLocaleStr(LID, LOCALE_S1159, 'AM');
  459. TimePMString := GetLocaleStr(LID, LOCALE_S2359, 'PM');
  460. if StrToIntDef(GetLocaleStr(LID, LOCALE_ITLZERO, '0'), 0) = 0 then
  461. HF:='h'
  462. else
  463. HF:='hh';
  464. // No support for 12 hour stuff at the moment...
  465. ShortTimeFormat := HF+':nn';
  466. LongTimeFormat := HF + ':nn:ss';
  467. { Currency stuff }
  468. CurrencyString:=GetLocaleStr(LID, LOCALE_SCURRENCY, '');
  469. CurrencyFormat:=StrToIntDef(GetLocaleStr(LID, LOCALE_ICURRENCY, '0'), 0);
  470. NegCurrFormat:=StrToIntDef(GetLocaleStr(LID, LOCALE_INEGCURR, '0'), 0);
  471. { Number stuff }
  472. ThousandSeparator:=GetLocaleChar(LID, LOCALE_STHOUSAND, ',');
  473. DecimalSeparator:=GetLocaleChar(LID, LOCALE_SDECIMAL, '.');
  474. CurrencyDecimals:=StrToIntDef(GetLocaleStr(LID, LOCALE_ICURRDIGITS, '0'), 0);
  475. end;
  476. Procedure InitInternational;
  477. begin
  478. InitAnsi;
  479. GetFormatSettings;
  480. end;
  481. {****************************************************************************
  482. Target Dependent
  483. ****************************************************************************}
  484. function FormatMessageA(dwFlags : DWORD;
  485. lpSource : Pointer;
  486. dwMessageId : DWORD;
  487. dwLanguageId: DWORD;
  488. lpBuffer : PCHAR;
  489. nSize : DWORD;
  490. Arguments : Pointer): DWORD; external 'kernel32' name 'FormatMessageA';
  491. function SysErrorMessage(ErrorCode: Integer): String;
  492. const
  493. MaxMsgSize = Format_Message_Max_Width_Mask;
  494. var
  495. MsgBuffer: pChar;
  496. begin
  497. GetMem(MsgBuffer, MaxMsgSize);
  498. FillChar(MsgBuffer^, MaxMsgSize, #0);
  499. FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM,
  500. nil,
  501. ErrorCode,
  502. MakeLangId(LANG_NEUTRAL, SUBLANG_DEFAULT),
  503. MsgBuffer, { This function allocs the memory }
  504. MaxMsgSize, { Maximum message size }
  505. nil);
  506. SysErrorMessage := StrPas(MsgBuffer);
  507. FreeMem(MsgBuffer, MaxMsgSize);
  508. end;
  509. {****************************************************************************
  510. Initialization code
  511. ****************************************************************************}
  512. Function GetEnvironmentVariable(Const EnvVar : String) : String;
  513. var
  514. s : string;
  515. i : longint;
  516. hp,p : pchar;
  517. begin
  518. Result:='';
  519. p:=GetEnvironmentStrings;
  520. hp:=p;
  521. while hp^<>#0 do
  522. begin
  523. s:=strpas(hp);
  524. i:=pos('=',s);
  525. if upcase(copy(s,1,i-1))=upcase(envvar) then
  526. begin
  527. Result:=copy(s,i+1,length(s)-i);
  528. break;
  529. end;
  530. { next string entry}
  531. hp:=hp+strlen(hp)+1;
  532. end;
  533. FreeEnvironmentStrings(p);
  534. end;
  535. {****************************************************************************
  536. Initialization code
  537. ****************************************************************************}
  538. var
  539. versioninfo : OSVERSIONINFO;
  540. kernel32dll : THandle;
  541. function FreeLibrary(hLibModule : THANDLE) : longbool;
  542. external 'kernel32' name 'FreeLibrary';
  543. function GetVersionEx(var VersionInformation:OSVERSIONINFO) : longbool;
  544. external 'kernel32' name 'GetVersionExA';
  545. function LoadLibrary(lpLibFileName : pchar):THandle;
  546. external 'kernel32' name 'LoadLibraryA';
  547. function GetProcAddress(hModule : THandle;lpProcName : pchar) : pointer;
  548. external 'kernel32' name 'GetProcAddress';
  549. Initialization
  550. InitExceptions; { Initialize exceptions. OS independent }
  551. InitInternational; { Initialize internationalization settings }
  552. versioninfo.dwOSVersionInfoSize:=sizeof(versioninfo);
  553. GetVersionEx(versioninfo);
  554. kernel32dll:=0;
  555. GetDiskFreeSpaceEx:=nil;
  556. Win32Platform:=versionInfo.dwPlatformId;
  557. if ((versioninfo.dwPlatformId=VER_PLATFORM_WIN32_WINDOWS) and
  558. (versioninfo.dwBuildNUmber>=1000)) or
  559. (versioninfo.dwPlatformId=VER_PLATFORM_WIN32_NT) then
  560. begin
  561. kernel32dll:=LoadLibrary('kernel32');
  562. if kernel32dll<>0 then
  563. GetDiskFreeSpaceEx:=TGetDiskFreeSpaceEx(GetProcAddress(kernel32dll,'GetDiskFreeSpaceExA'));
  564. end;
  565. Finalization
  566. DoneExceptions;
  567. if kernel32dll<>0 then
  568. FreeLibrary(kernel32dll);
  569. end.
  570. {
  571. $Log$
  572. Revision 1.22 2003-04-01 15:57:41 peter
  573. * made THandle platform dependent and unique type
  574. Revision 1.21 2003/03/29 18:21:42 hajny
  575. * DirectoryExists declaration changed to that one from fixes branch
  576. Revision 1.20 2003/03/28 19:06:59 peter
  577. * directoryexists added
  578. Revision 1.19 2003/01/03 20:41:04 peter
  579. * FileCreate(string,mode) overload added
  580. Revision 1.18 2003/01/01 20:56:57 florian
  581. + added invalid instruction exception
  582. Revision 1.17 2002/12/15 20:24:17 peter
  583. * some more C style functions
  584. Revision 1.16 2002/10/02 21:17:03 florian
  585. * we've to reimport TSystemTime time from the windows unit
  586. Revision 1.15 2002/09/07 16:01:29 peter
  587. * old logs removed and tabs fixed
  588. Revision 1.14 2002/05/09 08:28:23 carl
  589. * Merges from Fixes branch
  590. Revision 1.13 2002/03/24 19:26:49 marco
  591. * Added win32platform
  592. Revision 1.12 2002/01/25 16:23:04 peter
  593. * merged filesearch() fix
  594. }