mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 20:26:00 +02:00
* linux: FileGetDate makes use of statx if needed
git-svn-id: trunk@48476 -
This commit is contained in:
parent
ef04e3983f
commit
90ba89a128
@ -1077,14 +1077,22 @@ End;
|
|||||||
|
|
||||||
|
|
||||||
Function FileGetDate (Handle : Longint) : Int64;
|
Function FileGetDate (Handle : Longint) : Int64;
|
||||||
|
Var
|
||||||
Var Info : Stat;
|
Info : Stat;
|
||||||
|
{$ifdef USE_STATX}
|
||||||
|
Infox : Statx;
|
||||||
|
{$endif USE_STATX}
|
||||||
begin
|
begin
|
||||||
If (fpFStat(Handle,Info))<0 then
|
Result:=-1;
|
||||||
Result:=-1
|
{$ifdef USE_STATX}
|
||||||
else
|
if Fpstatx(Handle,nil,0,STATX_MTIME,Infox)=0 then
|
||||||
Result:=Info.st_Mtime;
|
Result:=Infox.stx_Mtime.tv_sec
|
||||||
|
else if fpgeterrno=ESysENOSYS then
|
||||||
|
{$endif USE_STATX}
|
||||||
|
begin
|
||||||
|
If fpFStat(Handle,Info)=0 then
|
||||||
|
Result:=Info.st_Mtime;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user