IsFileFiltered Method

Checks whether a particular file or directory is covered by any filter rules.

Syntax

int IsFileFiltered(const char* lpszFileName);
INT IsFileFiltered(LPCWSTR lpszFileName);

Remarks

This method checks whether the file or directory specified by FileName is covered by any of the standard filter rules active currently (i.e., whether the class would fire its events for one or more kinds of filesystem operations performed on it). If the specified file or directory matches any of the active standard filter rules, this method returns true; otherwise, it returns false.

Applications should use this method anytime they want to create/open some file or directory from within an event handler. If this method returns true, then the file or directory must be created/opened using the class's CreateFileDirect method rather than the Windows API's CreateFile function, since the latter could trigger recursion and cause a system deadlock.

Error Handling (C++)

This method returns a Boolean value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

 
 
Copyright (c) 2021 Callback Technologies, Inc. - All rights reserved.
CBFS Filter 2020 C++ Edition - Version 20.0 [Build 7836]