mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-06 15:18:29 +02:00
* unix: faSymLink
* unix: TSearchRec.PathOnly git-svn-id: trunk@1101 -
This commit is contained in:
parent
6bce91adc0
commit
b245075bb3
@ -23,6 +23,7 @@ Type
|
|||||||
{$ifdef unix}
|
{$ifdef unix}
|
||||||
FindHandle : Pointer;
|
FindHandle : Pointer;
|
||||||
Mode : TMode;
|
Mode : TMode;
|
||||||
|
PathOnly : AnsiString;
|
||||||
{$else unix}
|
{$else unix}
|
||||||
FindHandle : THandle;
|
FindHandle : THandle;
|
||||||
{$endif unix}
|
{$endif unix}
|
||||||
@ -48,6 +49,7 @@ Const
|
|||||||
faVolumeId = $00000008;
|
faVolumeId = $00000008;
|
||||||
faDirectory = $00000010;
|
faDirectory = $00000010;
|
||||||
faArchive = $00000020;
|
faArchive = $00000020;
|
||||||
|
faSymLink = $00000040;
|
||||||
faAnyFile = $0000003f;
|
faAnyFile = $0000003f;
|
||||||
|
|
||||||
{ File open modes }
|
{ File open modes }
|
||||||
|
@ -280,6 +280,8 @@ begin
|
|||||||
Result:=Result or faReadOnly;
|
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
|
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;
|
Result:=Result or faSysFile;
|
||||||
|
If fpS_ISLNK(Info.st_mode) Then
|
||||||
|
Result:=Result or faSymLink;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -520,6 +522,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
GlobSearchRec^.GlobHandle:=P^.Next;
|
GlobSearchRec^.GlobHandle:=P^.Next;
|
||||||
Result:=Fpstat(GlobSearchRec^.Path+StrPas(p^.name),SInfo)>=0;
|
Result:=Fpstat(GlobSearchRec^.Path+StrPas(p^.name),SInfo)>=0;
|
||||||
|
Info.PathOnly:=GlobSearchRec^.Path;
|
||||||
If Result then
|
If Result then
|
||||||
begin
|
begin
|
||||||
Info.Attr:=LinuxToWinAttr(p^.name,SInfo);
|
Info.Attr:=LinuxToWinAttr(p^.name,SInfo);
|
||||||
|
Loading…
Reference in New Issue
Block a user