mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 21:09:24 +02:00
implemented FileGetDate for MorphOS, based on FileAge implementation
git-svn-id: trunk@24775 -
This commit is contained in:
parent
c867fb14dd
commit
e3594452b5
@ -124,8 +124,25 @@ end;
|
||||
|
||||
|
||||
function FileGetDate(Handle: LongInt) : LongInt;
|
||||
var
|
||||
tmpFIB : PFileInfoBlock;
|
||||
tmpDateTime: TDateTime;
|
||||
validFile: boolean;
|
||||
begin
|
||||
{$WARNING filegetdate call is dummy}
|
||||
validFile:=false;
|
||||
|
||||
if (Handle <> 0) then begin
|
||||
new(tmpFIB);
|
||||
if ExamineFH(Handle,tmpFIB) then begin
|
||||
tmpDateTime:=AmigaFileDateToDateTime(tmpFIB^.fib_Date,validFile);
|
||||
end;
|
||||
dispose(tmpFIB);
|
||||
end;
|
||||
|
||||
if validFile then
|
||||
result:=DateTimeToFileDate(tmpDateTime)
|
||||
else
|
||||
result:=-1;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user