2
0
Эх сурвалжийг харах

* Implemented function ExeSearch

git-svn-id: trunk@12947 -
joost 16 жил өмнө
parent
commit
51b49d324e

+ 1 - 0
rtl/objpas/sysutils/filutilh.inc

@@ -96,6 +96,7 @@ Function FileSetAttr (Const Filename : String; Attr: longint) : Longint;
 Function DeleteFile (Const FileName : String) : Boolean;
 Function DeleteFile (Const FileName : String) : Boolean;
 Function RenameFile (Const OldName, NewName : String) : Boolean;
 Function RenameFile (Const OldName, NewName : String) : Boolean;
 Function FileSearch (Const Name, DirList : String; ImplicitCurrentDir : Boolean = True) : String;
 Function FileSearch (Const Name, DirList : String; ImplicitCurrentDir : Boolean = True) : String;
+Function ExeSearch  (Const Name, DirList : String) : String;
 Function FileIsReadOnly(const FileName: String): Boolean;
 Function FileIsReadOnly(const FileName: String): Boolean;
 
 
 Function GetFileHandle(var f : File):Longint;
 Function GetFileHandle(var f : File):Longint;

+ 10 - 0
rtl/objpas/sysutils/sysutils.inc

@@ -51,6 +51,16 @@
       result:='';
       result:='';
     end;
     end;
 
 
+    Function ExeSearch (Const Name, DirList : String) : String;
+
+    begin
+    {$ifdef unix}
+      Result := FileSearch(Name, DirList, False);
+    {$else unix}
+      Result := FileSearch(Name, DirList, True);
+    {$endif unix}
+    end;
+
   {$ifndef OS_FILEISREADONLY}
   {$ifndef OS_FILEISREADONLY}
   Function FileIsReadOnly(const FileName: String): Boolean;
   Function FileIsReadOnly(const FileName: String): Boolean;