CBFS Filter 2020 Python Edition

Questions / Feedback?

suspend_file_events Method

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

Syntax

def suspend_file_events() -> None: ...

Remarks

Applications can call this method from an on_after_create_file or on_after_open_file 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 class 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 on_after_create_file and on_after_open_file events

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