FileSize Function

Applies to TestComplete 15.47, last modified on January 20, 2023

The FileSize function returns the file size in records.

Declaration

FileSize(FileVar) Parameters
FileVar [in] Required Variant
Result     Integer  

Description

Use this routine to determine the number of records in the file opened with the Reset or Rewrite procedure. The size of the record is specified by the RecSize parameter of these procedures. If this parameter is 1, FileSize will return the file size in bytes.

Parameters

The function has the following parameter:

FileVar

Specifies the file variable which is associated with the desired file by calling the AssignFile procedure.

Return Value

Returns an integer value that holds the number of records in the specified file. If the RecSize parameter of the Reset or Rewrite procedure is not specified, FileSize returns -1.

See Also

DelphiScript - List of Supported Routines and Variables
Reset
Rewrite
AssignFile

Highlight search results