ssCore.BinaryFile.getFilePointer

Determine the current position of the file pointer.


Availability:

First available in version 3.7 build 197.


Input Parameters:

None.


Output Parameters:

result - The offset in bytes from the beginning of the file.

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.getFilePointer( 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.getFilePointer( paramsObject );


Notes:

None.


Examples:

After writing the data, the file pointer should be set to 13.

ssCore.BinaryFile.create({path:"startdir://test.dat", accessMode:"write", failIfExists:"false"});
ssCore.BinaryFile.writeBytes({data:"i am the data", format:"utf8"});
r = ssCore.BinaryFile.getFilePointer({});
ssDebug.trace("file pointer is now: " + r.result);
ssCore.BinaryFile.close({});