sysutils.pp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  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 linux
  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. {$DEFINE HAS_SLEEP}
  19. {$DEFINE HAS_OSERROR}
  20. {$DEFINE HASUNIX}
  21. uses
  22. Unix,errors,sysconst;
  23. { Include platform independent interface part }
  24. {$i sysutilh.inc}
  25. implementation
  26. Uses UnixUtil,Baseunix,UnixType;
  27. {$Define OS_FILEISREADONLY} // Specific implementation for Unix.
  28. { Include platform independent implementation part }
  29. {$i sysutils.inc}
  30. {****************************************************************************
  31. File Functions
  32. ****************************************************************************}
  33. Function FileOpen (Const FileName : string; Mode : Integer) : Longint;
  34. Var LinuxFlags : longint;
  35. BEGIN
  36. LinuxFlags:=0;
  37. Case (Mode and 3) of
  38. 0 : LinuxFlags:=LinuxFlags or O_RdOnly;
  39. 1 : LinuxFlags:=LinuxFlags or O_WrOnly;
  40. 2 : LinuxFlags:=LinuxFlags or O_RdWr;
  41. end;
  42. FileOpen:=fpOpen (FileName,LinuxFlags);
  43. //!! We need to set locking based on Mode !!
  44. end;
  45. Function FileCreate (Const FileName : String) : Longint;
  46. begin
  47. FileCreate:=fpOpen(FileName,O_RdWr or O_Creat or O_Trunc);
  48. end;
  49. Function FileCreate (Const FileName : String;Mode : Longint) : Longint;
  50. Var LinuxFlags : longint;
  51. BEGIN
  52. LinuxFlags:=0;
  53. Case (Mode and 3) of
  54. 0 : LinuxFlags:=LinuxFlags or O_RdOnly;
  55. 1 : LinuxFlags:=LinuxFlags or O_WrOnly;
  56. 2 : LinuxFlags:=LinuxFlags or O_RdWr;
  57. end;
  58. FileCreate:=fpOpen(FileName,LinuxFlags or O_Creat or O_Trunc);
  59. end;
  60. Function FileRead (Handle : Longint; Var Buffer; Count : longint) : Longint;
  61. begin
  62. FileRead:=fpRead (Handle,Buffer,Count);
  63. end;
  64. Function FileWrite (Handle : Longint; const Buffer; Count : Longint) : Longint;
  65. begin
  66. FileWrite:=fpWrite (Handle,Buffer,Count);
  67. end;
  68. Function FileSeek (Handle,FOffset,Origin : Longint) : Longint;
  69. begin
  70. FileSeek:=fplSeek (Handle,FOffset,Origin);
  71. end;
  72. Function FileSeek (Handle : Longint; FOffset,Origin : Int64) : Int64;
  73. begin
  74. {$warning need to add 64bit call }
  75. FileSeek:=fplSeek (Handle,FOffset,Origin);
  76. end;
  77. Procedure FileClose (Handle : Longint);
  78. begin
  79. fpclose(Handle);
  80. end;
  81. Function FileTruncate (Handle,Size: Longint) : boolean;
  82. begin
  83. FileTruncate:=fpftruncate(Handle,Size)>=0;
  84. end;
  85. Function UnixToWinAge(UnixAge : time_t): Longint;
  86. Var
  87. Y,M,D,hh,mm,ss : word;
  88. begin
  89. EpochToLocal(UnixAge,y,m,d,hh,mm,ss);
  90. Result:=DateTimeToFileDate(EncodeDate(y,m,d)+EncodeTime(hh,mm,ss,0));
  91. end;
  92. Function FileAge (Const FileName : String): Longint;
  93. Var Info : Stat;
  94. Y,M,D,hh,mm,ss : word;
  95. begin
  96. If fpstat (FileName,Info)<0 then
  97. exit(-1)
  98. else
  99. Result:=UnixToWinAge(info.st_mtime);
  100. end;
  101. Function FileExists (Const FileName : String) : Boolean;
  102. Var Info : Stat;
  103. begin
  104. FileExists:=fpstat(filename,Info)>=0;
  105. end;
  106. Function DirectoryExists (Const Directory : String) : Boolean;
  107. Var Info : Stat;
  108. begin
  109. DirectoryExists:=(fpstat(Directory,Info)>=0) and fpS_ISDIR(Info.st_mode);
  110. end;
  111. Function LinuxToWinAttr (FN : Pchar; Const Info : Stat) : Longint;
  112. begin
  113. Result:=faArchive;
  114. If fpS_ISDIR(Info.st_mode) then
  115. Result:=Result or faDirectory;
  116. If (FN[0]='.') and (not (FN[1] in [#0,'.'])) then
  117. Result:=Result or faHidden;
  118. If (Info.st_Mode and S_IWUSR)=0 Then
  119. Result:=Result or faReadOnly;
  120. If fpS_ISSOCK(Info.st_mode) or fpS_ISBLK(Info.st_mode) or fpS_ISCHR(Info.st_mode) or fpS_ISFIFO(Info.st_mode) Then
  121. Result:=Result or faSysFile;
  122. end;
  123. {
  124. GlobToSearch takes a glob entry, stats the file.
  125. The glob entry is removed.
  126. If FileAttributes match, the entry is reused
  127. }
  128. Type
  129. TGlobSearchRec = Record
  130. Path : String;
  131. GlobHandle : PGlob;
  132. end;
  133. PGlobSearchRec = ^TGlobSearchRec;
  134. Function GlobToTSearchRec (Var Info : TSearchRec) : Boolean;
  135. Var SInfo : Stat;
  136. p : Pglob;
  137. GlobSearchRec : PGlobSearchrec;
  138. begin
  139. GlobSearchRec:=Info.FindHandle;
  140. P:=GlobSearchRec^.GlobHandle;
  141. Result:=P<>Nil;
  142. If Result then
  143. begin
  144. GlobSearchRec^.GlobHandle:=P^.Next;
  145. Result:=Fpstat(GlobSearchRec^.Path+StrPas(p^.name),SInfo)>=0;
  146. If Result then
  147. begin
  148. Info.Attr:=LinuxToWinAttr(p^.name,SInfo);
  149. Result:=(Info.ExcludeAttr and Info.Attr)=0;
  150. If Result Then
  151. With Info do
  152. begin
  153. Attr:=Info.Attr;
  154. If P^.Name<>Nil then
  155. Name:=strpas(p^.name);
  156. Time:=UnixToWinAge(Sinfo.st_mtime);
  157. Size:=Sinfo.st_Size;
  158. end;
  159. end;
  160. P^.Next:=Nil;
  161. GlobFree(P);
  162. end;
  163. end;
  164. Function DoFind(Var Rslt : TSearchRec) : Longint;
  165. Var
  166. GlobSearchRec : PGlobSearchRec;
  167. begin
  168. Result:=-1;
  169. GlobSearchRec:=Rslt.FindHandle;
  170. If (GlobSearchRec^.GlobHandle<>Nil) then
  171. While (GlobSearchRec^.GlobHandle<>Nil) and not (Result=0) do
  172. If GlobToTSearchRec(Rslt) Then Result:=0;
  173. end;
  174. Function FindFirst (Const Path : String; Attr : Longint; Var Rslt : TSearchRec) : Longint;
  175. Var
  176. GlobSearchRec : PGlobSearchRec;
  177. begin
  178. New(GlobSearchRec);
  179. GlobSearchRec^.Path:=ExpandFileName(ExtractFilePath(Path));
  180. GlobSearchRec^.GlobHandle:=Glob(Path);
  181. Rslt.ExcludeAttr:=Not Attr and (faHidden or faSysFile or faVolumeID or faDirectory); //!! Not correct !!
  182. Rslt.FindHandle:=GlobSearchRec;
  183. Result:=DoFind (Rslt);
  184. end;
  185. Function FindNext (Var Rslt : TSearchRec) : Longint;
  186. begin
  187. Result:=DoFind (Rslt);
  188. end;
  189. Procedure FindClose (Var F : TSearchrec);
  190. Var
  191. GlobSearchRec : PGlobSearchRec;
  192. begin
  193. GlobSearchRec:=F.FindHandle;
  194. GlobFree (GlobSearchRec^.GlobHandle);
  195. Dispose(GlobSearchRec);
  196. end;
  197. Function FileGetDate (Handle : Longint) : Longint;
  198. Var Info : Stat;
  199. begin
  200. If (fpFStat(Handle,Info))<0 then
  201. Result:=-1
  202. else
  203. Result:=Info.st_Mtime;
  204. end;
  205. Function FileSetDate (Handle,Age : Longint) : Longint;
  206. begin
  207. // Impossible under Linux from FileHandle !!
  208. FileSetDate:=-1;
  209. end;
  210. Function FileGetAttr (Const FileName : String) : Longint;
  211. Var Info : Stat;
  212. begin
  213. If FpStat (FileName,Info)<0 then
  214. Result:=-1
  215. Else
  216. Result:=LinuxToWinAttr(Pchar(FileName),Info);
  217. end;
  218. Function FileSetAttr (Const Filename : String; Attr: longint) : Longint;
  219. begin
  220. Result:=-1;
  221. end;
  222. Function DeleteFile (Const FileName : String) : Boolean;
  223. begin
  224. Result:=fpUnLink (FileName)>=0;
  225. end;
  226. Function RenameFile (Const OldName, NewName : String) : Boolean;
  227. begin
  228. RenameFile:=BaseUnix.FpRename(OldNAme,NewName)>=0;
  229. end;
  230. Function FileIsReadOnly(const FileName: String): Boolean;
  231. begin
  232. Result := fpAccess(PChar(FileName),W_OK)<>0;
  233. end;
  234. {****************************************************************************
  235. Disk Functions
  236. ****************************************************************************}
  237. {
  238. The Diskfree and Disksize functions need a file on the specified drive, since this
  239. is required for the statfs system call.
  240. These filenames are set in drivestr[0..26], and have been preset to :
  241. 0 - '.' (default drive - hence current dir is ok.)
  242. 1 - '/fd0/.' (floppy drive 1 - should be adapted to local system )
  243. 2 - '/fd1/.' (floppy drive 2 - should be adapted to local system )
  244. 3 - '/' (C: equivalent of dos is the root partition)
  245. 4..26 (can be set by you're own applications)
  246. ! Use AddDisk() to Add new drives !
  247. They both return -1 when a failure occurs.
  248. }
  249. Const
  250. FixDriveStr : array[0..3] of pchar=(
  251. '.',
  252. '/fd0/.',
  253. '/fd1/.',
  254. '/.'
  255. );
  256. var
  257. Drives : byte;
  258. DriveStr : array[4..26] of pchar;
  259. Procedure AddDisk(const path:string);
  260. begin
  261. if not (DriveStr[Drives]=nil) then
  262. FreeMem(DriveStr[Drives],StrLen(DriveStr[Drives])+1);
  263. GetMem(DriveStr[Drives],length(Path)+1);
  264. StrPCopy(DriveStr[Drives],path);
  265. inc(Drives);
  266. if Drives>26 then
  267. Drives:=4;
  268. end;
  269. Function DiskFree(Drive: Byte): int64;
  270. var
  271. fs : tstatfs;
  272. Begin
  273. if ((Drive<4) and (not (fixdrivestr[Drive]=nil)) and (statfs(StrPas(fixdrivestr[drive]),fs)<>-1)) or
  274. ((not (drivestr[Drive]=nil)) and (statfs(StrPas(drivestr[drive]),fs)<>-1)) then
  275. Diskfree:=int64(fs.bavail)*int64(fs.bsize)
  276. else
  277. Diskfree:=-1;
  278. End;
  279. Function DiskSize(Drive: Byte): int64;
  280. var
  281. fs : tstatfs;
  282. Begin
  283. if ((Drive<4) and (not (fixdrivestr[Drive]=nil)) and (statfs(StrPas(fixdrivestr[drive]),fs)<>-1)) or
  284. ((not (drivestr[Drive]=nil)) and (statfs(StrPas(drivestr[drive]),fs)<>-1)) then
  285. DiskSize:=int64(fs.blocks)*int64(fs.bsize)
  286. else
  287. DiskSize:=-1;
  288. End;
  289. Function GetCurrentDir : String;
  290. begin
  291. GetDir (0,Result);
  292. end;
  293. Function SetCurrentDir (Const NewDir : String) : Boolean;
  294. begin
  295. {$I-}
  296. ChDir(NewDir);
  297. {$I+}
  298. result := (IOResult = 0);
  299. end;
  300. Function CreateDir (Const NewDir : String) : Boolean;
  301. begin
  302. {$I-}
  303. MkDir(NewDir);
  304. {$I+}
  305. result := (IOResult = 0);
  306. end;
  307. Function RemoveDir (Const Dir : String) : Boolean;
  308. begin
  309. {$I-}
  310. RmDir(Dir);
  311. {$I+}
  312. result := (IOResult = 0);
  313. end;
  314. {****************************************************************************
  315. Misc Functions
  316. ****************************************************************************}
  317. procedure Beep;
  318. begin
  319. end;
  320. {****************************************************************************
  321. Locale Functions
  322. ****************************************************************************}
  323. Procedure GetLocalTime(var SystemTime: TSystemTime);
  324. begin
  325. Unix.GetTime(SystemTime.Hour, SystemTime.Minute, SystemTime.Second);
  326. Unix.GetDate(SystemTime.Year, SystemTime.Month, SystemTime.Day);
  327. SystemTime.MilliSecond := 0;
  328. end ;
  329. Procedure InitAnsi;
  330. Var
  331. i : longint;
  332. begin
  333. { Fill table entries 0 to 127 }
  334. for i := 0 to 96 do
  335. UpperCaseTable[i] := chr(i);
  336. for i := 97 to 122 do
  337. UpperCaseTable[i] := chr(i - 32);
  338. for i := 123 to 191 do
  339. UpperCaseTable[i] := chr(i);
  340. Move (CPISO88591UCT,UpperCaseTable[192],SizeOf(CPISO88591UCT));
  341. for i := 0 to 64 do
  342. LowerCaseTable[i] := chr(i);
  343. for i := 65 to 90 do
  344. LowerCaseTable[i] := chr(i + 32);
  345. for i := 91 to 191 do
  346. LowerCaseTable[i] := chr(i);
  347. Move (CPISO88591LCT,LowerCaseTable[192],SizeOf(CPISO88591UCT));
  348. end;
  349. Procedure InitInternational;
  350. begin
  351. InitAnsi;
  352. end;
  353. function SysErrorMessage(ErrorCode: Integer): String;
  354. begin
  355. Result:=StrError(ErrorCode);
  356. end;
  357. {****************************************************************************
  358. OS utility functions
  359. ****************************************************************************}
  360. Function GetEnvironmentVariable(Const EnvVar : String) : String;
  361. begin
  362. Result:=StrPas(BaseUnix.FPGetenv(PChar(EnvVar)));
  363. end;
  364. {$define FPC_USE_FPEXEC} // leave the old code under IFDEF for a while.
  365. function ExecuteProcess(Const Path: AnsiString; Const ComLine: AnsiString):integer;
  366. var
  367. pid : longint;
  368. err : longint;
  369. e : EOSError;
  370. CommandLine: AnsiString;
  371. cmdline2 : ppchar;
  372. Begin
  373. { always surround the name of the application by quotes
  374. so that long filenames will always be accepted. But don't
  375. do it if there are already double quotes!
  376. }
  377. {$ifdef FPC_USE_FPEXEC} // Only place we still parse
  378. cmdline2:=nil;
  379. if Comline<>'' Then
  380. begin
  381. CommandLine:=ComLine;
  382. cmdline2:=StringtoPPChar(CommandLine,1);
  383. cmdline2^:=pchar(Path);
  384. end
  385. else
  386. begin
  387. getmem(cmdline2,2*sizeof(pchar));
  388. cmdline2^:=pchar(Path);
  389. cmdline2[1]:=nil;
  390. end;
  391. {$else}
  392. if Pos ('"', Path) = 0 then
  393. CommandLine := '"' + Path + '"'
  394. else
  395. CommandLine := Path;
  396. if ComLine <> '' then
  397. CommandLine := Commandline + ' ' + ComLine;
  398. {$endif}
  399. pid:=fpFork;
  400. if pid=0 then
  401. begin
  402. {The child does the actual exec, and then exits}
  403. {$ifdef FPC_USE_FPEXEC}
  404. fpexecv(pchar(Path),Cmdline2);
  405. {$else}
  406. Execl(CommandLine);
  407. {$endif}
  408. { If the execve fails, we return an exitvalue of 127, to let it be known}
  409. fpExit(127);
  410. end
  411. else
  412. if pid=-1 then {Fork failed}
  413. begin
  414. e:=EOSError.CreateFmt(SExecuteProcessFailed,[CommandLine,-1]);
  415. e.ErrorCode:=-1;
  416. raise e;
  417. end;
  418. { We're in the parent, let's wait. }
  419. result:=WaitProcess(pid); // WaitPid and result-convert
  420. if (result>=0) and (result<>127) then
  421. result:=0
  422. else
  423. begin
  424. e:=EOSError.CreateFmt(SExecuteProcessFailed,[CommandLine,result]);
  425. e.ErrorCode:=result;
  426. raise e;
  427. end;
  428. End;
  429. function ExecuteProcess(Const Path: AnsiString; Const ComLine: Array Of AnsiString):integer;
  430. var
  431. pid : longint;
  432. err : longint;
  433. e : EOSError;
  434. Begin
  435. { always surround the name of the application by quotes
  436. so that long filenames will always be accepted. But don't
  437. do it if there are already double quotes!
  438. }
  439. pid:=fpFork;
  440. if pid=0 then
  441. begin
  442. {The child does the actual exec, and then exits}
  443. fpexecl(Path,Comline);
  444. { If the execve fails, we return an exitvalue of 127, to let it be known}
  445. fpExit(127);
  446. end
  447. else
  448. if pid=-1 then {Fork failed}
  449. begin
  450. e:=EOSError.CreateFmt(SExecuteProcessFailed,[Path,-1]);
  451. e.ErrorCode:=-1;
  452. raise e;
  453. end;
  454. { We're in the parent, let's wait. }
  455. result:=WaitProcess(pid); // WaitPid and result-convert
  456. if (result>=0) and (result<>127) then
  457. result:=0
  458. else
  459. begin
  460. e:=EOSError.CreateFmt(SExecuteProcessFailed,[Path,result]);
  461. e.ErrorCode:=result;
  462. raise e;
  463. end;
  464. End;
  465. procedure Sleep(milliseconds: Cardinal);
  466. Var
  467. fd : Integer;
  468. fds : TfdSet;
  469. timeout : TimeVal;
  470. begin
  471. fd:=FileOpen('/dev/null',fmOpenRead);
  472. If Not(Fd<0) then
  473. begin
  474. fpfd_zero(fds);
  475. fpfd_set(0,fds);
  476. timeout.tv_sec:=Milliseconds div 1000;
  477. timeout.tv_usec:=(Milliseconds mod 1000) * 1000;
  478. fpSelect(1,Nil,Nil,@fds,@timeout);
  479. end;
  480. end;
  481. Function GetLastOSError : Integer;
  482. begin
  483. Result:=fpgetErrNo;
  484. end;
  485. {****************************************************************************
  486. Initialization code
  487. ****************************************************************************}
  488. Initialization
  489. InitExceptions; { Initialize exceptions. OS independent }
  490. InitInternational; { Initialize internationalization settings }
  491. Finalization
  492. DoneExceptions;
  493. end.
  494. {
  495. $Log$
  496. Revision 1.43 2004-07-03 21:50:31 daniel
  497. * Modified bootstrap code so separate prt0.as/prt0_10.as files are no
  498. longer necessary
  499. Revision 1.42 2004/06/15 07:36:03 michael
  500. + Fixed Globtosearchrec to use unixtowinage
  501. Revision 1.41 2004/05/22 14:25:03 michael
  502. + Fixed FindFirst/FindNext so it treats the attributes correctly
  503. Revision 1.40 2004/04/28 20:48:20 peter
  504. * ordinal-pointer conversions fixed
  505. Revision 1.39 2004/04/26 14:50:19 peter
  506. * FileIsReadOnly fixed
  507. Revision 1.38 2004/04/20 18:24:32 marco
  508. * small fix for NIL arg ptr in first executeprocess
  509. Revision 1.37 2004/03/04 22:15:16 marco
  510. * UnixType changes. Please report problems to me.
  511. Revision 1.36 2004/02/13 10:50:23 marco
  512. * Hopefully last large changes to fpexec and friends.
  513. - naming conventions changes from Michael.
  514. - shell functions get alternative under ifdef.
  515. - arraystring function moves to unixutil
  516. - unixutil now regards quotes in stringtoppchar.
  517. - sysutils/unix get executeprocess(ansi,array of ansi), and
  518. both executeprocess functions are fixed
  519. - Sysutils/win32 get executeprocess(ansi,array of ansi)
  520. Revision 1.35 2004/02/12 15:31:06 marco
  521. * First version of fpexec change. Still under ifdef or silently overloaded
  522. Revision 1.34 2004/02/09 17:11:17 marco
  523. * fixed for 1.0 errno->fpgeterrno
  524. Revision 1.33 2004/02/08 14:50:51 michael
  525. + Added fileIsReadOnly
  526. Revision 1.32 2004/02/08 11:01:17 michael
  527. + Implemented getlastoserror
  528. Revision 1.31 2004/01/20 23:13:53 hajny
  529. * ExecuteProcess fixes, ProcessID and ThreadID added
  530. Revision 1.30 2004/01/10 17:34:36 michael
  531. + Implemented sleep() on Unix.
  532. Revision 1.29 2004/01/05 22:42:35 florian
  533. * compilation error fixed
  534. Revision 1.28 2004/01/05 22:37:15 florian
  535. * changed sysutils.exec to ExecuteProcess
  536. Revision 1.27 2004/01/03 09:09:11 marco
  537. * Unix exec(ansistring)
  538. Revision 1.26 2003/11/26 20:35:14 michael
  539. + Some fixes to have everything compile again
  540. Revision 1.25 2003/11/17 10:05:51 marco
  541. * threads for FreeBSD. Not working tho
  542. Revision 1.24 2003/10/25 23:43:59 hajny
  543. * THandle in sysutils common using System.THandle
  544. Revision 1.23 2003/10/07 08:28:49 marco
  545. * fix from Vincent to casetables
  546. Revision 1.22 2003/09/27 12:51:33 peter
  547. * fpISxxx macros renamed to C compliant fpS_ISxxx
  548. Revision 1.21 2003/09/17 19:07:44 marco
  549. * more fixes for Unix<->unixutil
  550. Revision 1.20 2003/09/17 12:41:31 marco
  551. * Uses more baseunix, less unix now
  552. Revision 1.19 2003/09/14 20:15:01 marco
  553. * Unix reform stage two. Remove all calls from Unix that exist in Baseunix.
  554. Revision 1.18 2003/04/01 15:57:41 peter
  555. * made THandle platform dependent and unique type
  556. Revision 1.17 2003/03/30 10:38:00 armin
  557. * corrected typo in DirectoryExists
  558. Revision 1.16 2003/03/29 18:21:42 hajny
  559. * DirectoryExists declaration changed to that one from fixes branch
  560. Revision 1.15 2003/03/28 19:06:59 peter
  561. * directoryexists added
  562. Revision 1.14 2003/01/03 20:41:04 peter
  563. * FileCreate(string,mode) overload added
  564. Revision 1.13 2002/09/07 16:01:28 peter
  565. * old logs removed and tabs fixed
  566. Revision 1.12 2002/01/25 16:23:03 peter
  567. * merged filesearch() fix
  568. }