Sfoglia il codice sorgente

* unix: faSymLink
* unix: TSearchRec.PathOnly

git-svn-id: trunk@1101 -

florian 20 anni fa
parent
commit
b245075bb3
2 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 2 0
      rtl/objpas/sysutils/filutilh.inc
  2. 3 0
      rtl/unix/sysutils.pp

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

@@ -23,6 +23,7 @@ Type
 {$ifdef unix}
     FindHandle : Pointer;
     Mode : TMode;
+    PathOnly : AnsiString;
 {$else unix}
     FindHandle : THandle;
 {$endif unix}
@@ -48,6 +49,7 @@ Const
   faVolumeId  = $00000008;
   faDirectory = $00000010;
   faArchive   = $00000020;
+  faSymLink   = $00000040;
   faAnyFile   = $0000003f;
 
   { File open modes }

+ 3 - 0
rtl/unix/sysutils.pp

@@ -280,6 +280,8 @@ begin
      Result:=Result or faReadOnly;
   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
      Result:=Result or faSysFile;
+  If fpS_ISLNK(Info.st_mode) Then
+    Result:=Result or faSymLink;
 end;
 
 type
@@ -520,6 +522,7 @@ begin
     begin
     GlobSearchRec^.GlobHandle:=P^.Next;
     Result:=Fpstat(GlobSearchRec^.Path+StrPas(p^.name),SInfo)>=0;
+    Info.PathOnly:=GlobSearchRec^.Path;
     If Result then
       begin
       Info.Attr:=LinuxToWinAttr(p^.name,SInfo);