Gets information on an open file
Source position: amigados.pas line 2264
function ExamineFH(  | 
Fh: Pointer;  | 
Fib: PFileInfoBlock  | 
):LongBool;  | 
Fh  | 
  | 
Filehandle you wish to examine  | 
Fib  | 
  | 
FileInfoBlock, must be longword aligned.  | 
Examines a filehandle and returns information about the file in the FileInfoBlock. There are no guarantees as to whether the fib_Size field will reflect any changes made to the file size it was opened, though filesystems should attempt to provide up-to-date information for it.
program ExamineFHTest; uses AmigaDOS; var FH: BPTR; FIB: PFileInfoBlock; begin FH := DOSOpen('c:dir', MODE_OLDFILE); FIB := AllocDosObject(DOS_FIB, nil); if Assigned(FIB) and (FH <> 0) then begin if Boolean(ExamineFH(FH, FIB)) then writeln('Size: ',FIB^.fib_size); end; if Assigned(FIB) then FreeDosObject(DOS_FIB, FIB); if FH <> 0 then DOSClose(FH); end.