SuspendFileEvents Method

Suspends all events for a particular file or directory until all of its handles have been closed.

Syntax

func (obj *CBFilter) SuspendFileEvents() error

Remarks

Applications can call this method from an AfterCreateFile or AfterOpenFile event to suspend all further events for the file or directory that the event fired for. The suspension will remain in effect until all handles to said file or directory have been closed, at which point the component will once again fire events for it (if it is accessed again).

Typically, this method should only be used as a "last resort"; that is, when the application cannot achieve the same outcome through the use of more granular standard filter rules. Said another way, it is almost always more efficient for an application to exclude files and/or directories implicitly using standard filter rules, if possible, than it is to exclude them explicitly using this method.

Note: This method can only be called within the AfterCreateFile and AfterOpenFile events

Copyright (c) 2022 Callback Technologies, Inc. - All rights reserved.
CBFS Filter 2020 Go Edition - Version 20.0 [Build 8317]