FileLength

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloConnection > TApolloConnection Methods >

FileLength

Declaration

function FileLength( sDatabaseName, sFileName: String ): Integer;

Description

Returns the length of the specified remote file. For local files, see the FindFirst function (from the SysUtils unit) in the Delphi help.

Parameters

sDatabaseName is the name of the database where the file is located.

sFileName is the name of the file to get the length of.

Returns

The size of the file in bytes are returned as an Integer.

Delphi Example

procedure TForm1.Button1Click(Sender: TObject);

begin

 with ApolloConnection1 do 

 begin 

         Active := True; 

         if FileReceive( 'SAMPLEDATA', 'TEST.DBF', 'C:\Apollo\MyTest.dbf' ) <> FileLength ( 'SAMPLEDATA', 'TEST.DBF' ) then

                 ShowMessage( 'Error receiving file!' ); 

 end; 

end;

See Also

FileExistsFileExists, FileReceiveFileReceive, DatabaseNameTApolloConnection_DatabaseName