../pvss.htm menu.gif basics.gif

getFileSize()

The function checks the size of the defined file.

Synopsis

int getFileSize(string path);

Parameters

Return value

The function returns the file size in bytes if OK or in the event of an error, -1.

Error

If the file does not exist.

Description

The function checks the size of the defined file. Copying large files can cause WinCC OA to reach the Emergency mode. To avoid this, check the file size before.

IconExample

main()
{
int size;
size=getFileSize("C:/NewProject/HTTP/panels/childpanelon.pnl");
DebugN(size); // File size in bytes
}

Relates to

File functions

Availability

UI, CTRL, DP

See also

Top Of Page

 

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved