Unit 'AmigaDOS' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

ExamineFH64

Fill in a FileInfoBlock structure concerning a file associated with a particular filehandle.

Declaration

Source position: amigados.pas line 2308

function ExamineFH64(

  Fh: LongInt;

  Fib: PFileInfoBlock;

  Tags: Pointer

):LongInt;

Arguments

Fh

  

filehandle to examine

Fib

  

FileInfoBlock where the result of the examination is stored

Tags

  

tags, no tags defined for now

Function result

=0 fail, <> 0 success

Description

Fill in a FileInfoBlock structure where TFileHandle.fib_Size64 containing the size of the file. TFileHandle.fib_NumBlocks64 contains the number of blocks for the file.

See also

Examine64

  

Fill in a FileInfoBlock structure concerning a file or directory associated with a particular lock.

Example

program ExamineFH64Test;
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(ExamineFH64(FH, FIB, nil)) then
      writeln('Size: ', FIB^.fib_size64);
  end;
  if Assigned(FIB) then FreeDosObject(DOS_FIB, FIB);
  if FH <> 0 then DOSClose(FH);
end.

Documentation generated on: 2021-07-30