mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +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;
|
||||
|
||||
Var Info : Stat;
|
||||
|
||||
Var
|
||||
Info : Stat;
|
||||
{$ifdef USE_STATX}
|
||||
Infox : Statx;
|
||||
{$endif USE_STATX}
|
||||
begin
|
||||
If (fpFStat(Handle,Info))<0 then
|
||||
Result:=-1
|
||||
else
|
||||
Result:=Info.st_Mtime;
|
||||
Result:=-1;
|
||||
{$ifdef USE_STATX}
|
||||
if Fpstatx(Handle,nil,0,STATX_MTIME,Infox)=0 then
|
||||
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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user