OpenObjectsCount Property
The number of filesystem objects in the virtual drive that are currently open.
Syntax
cbfs.getOpenObjectsCount([callback])
Default Value
0
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for the getOpenObjectsCount([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setOpenObjectsCount([callback]) method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This property reflects the number of filesystem objects (files, directories, etc.) in the virtual drive that are currently open. It is populated when CreateOpenedFilesSnapshot is called, and cleared when CloseOpenedFilesSnapshot is called; please refer to those methods for more information.
This property's value may differ from that of the OpenHandlesCount property, and from the number of items in the OpenFile* properties. This occurs because each object can be opened several times, and because the OS may keep files open even after all handles to them have been closed.
Note: The methods and properties related to open files snapshots are not intended to be used from multiple threads at once. Applications that wish to use said methods and properties from multiple threads are responsible for employing proper thread synchronization techniques to ensure that creation, use, and cleanup of open files snapshots occurs in a thread-safe manner.
This property is read-only and not available at design time.
Data Type
Integer