implemented FileGetDate for MorphOS, based on FileAge implementation

git-svn-id: trunk@24775 -
This commit is contained in:
Károly Balogh 2013-06-02 14:03:24 +00:00
parent c867fb14dd
commit e3594452b5

View File

@ -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;