File.GetSize

Top  Previous  Next

 

Syntax

function File.GetSize(F: pointer): large-integer

 

Alternative Names

ibec_fs_Size

 

Description

Returns the size of the given file-stream in bytes.

 

See also

File.Seek
File.SetSize

 

Example

execute udsblock

as

begin

  /* open text file with UTF8 encoding preamble */ 

  fs = File.Open('c:\data\utf8text.txt', __fmOpenReadWrite + __fmShareDenyWrite);

  try

    GUI.ShowMessage('This file is ' || File.GetSize(fs) || 'bytes long.');

  finally

    File.Close(fs);

  end

end