sysutils.pp 18 KB

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