<< ibec_fs_OpenFile | IBEBlock | ibec_fs_Readln >>

ibec_fs_Position

Returns the current offset into the stream for reading and writing.

Syntax

  function ibec_fs_Position(FileHandle : variant) : integer;

Description

Use ibec_fs_Position to obtain the current position of the stream. This is the number of bytes from the beginning of the streamed data.

This function now supports files larger than 2 GB.

Example

  execute IBEBlock
  returns (vcout varchar(1000))
  as
  begin
    FileName = 'C:\mydata.csv';
    FH = ibec_fs_OpenFile(FileName, __fmOpenRead);
    if (not FH is NULL) then
    begin
      while (ibec_fs_Position(FH) < ibec_fs_Size(FH)) do
      begin
        vcout = ibec_fs_Readln(FH);
        suspend;
      end
      ibec_fs_CloseFile(FH);
    end
  end

See also:
ibec_fs_Seek

back to top of page
<< ibec_fs_OpenFile | IBEBlock | ibec_fs_Readln >>