ibec_FileSize

Returns the size of the specified file.

Syntax

  function ibec_FileSize(FileName : string): variant;

Description

The ibec_FileSize function returns the size in bytes of the file specified by FileName. If the file does not exist, the function returns NULL.

This function supports Unicode (UTF8) file names. You can still use ANSI names, necessary checks and conversion are performed automatically.

Example

  execute ibeblock
  returns (fname varchar(100), isize integer)
  as
  begin
    options = __gfFullName;
    files_count = ibec_getfiles(files_list, 'E:\Projects_5\', '*.*', options);
    if (files_count > 0) then
    begin
      i = 0;
      while (i < ibec_high(files_list)) do
      begin
        fname = files_list[i];
        isize = ibec_filesize(fname);
        suspend;
        i = i + 1;
      end
    end
  end

See also:
Example: Importing data from a file
Inserting file data into a database

back to top of page
<< ibec_FileExists | IBEBlock | ibec_GetFiles >>