ssCore.BinaryFile.getSize

Get the size of the file in bytes.


Availability:

First available in version 3.7 build 197.


Input Parameters:

None.


Output Parameters:

result - The size of the file in bytes.

systemError - A system specific error code from the GetLastError function.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.BinaryFile.getSize( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.BinaryFile.getSize( paramsObject );


Notes:

None.


Examples:

Open an existing file and find out how big it is.

ssCore.BinaryFile.open({path:"startdir://test.dat", accessMode:"read"});
r = ssCore.BinaryFile.getSize({});
ssDebug.trace("file size is: " + r.result + " bytes");
ssCore.BinaryFile.close({});