CallbackFilter.AddFilterAccessRule method


Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

CallbackFilter     See also    


This method adds a filter access rule.


    function AddFilterAccessRule(Mask : TCBString; AccessFlag : LongWord): boolean;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    bool AddFilterAccessRule(LPCWSTR Mask, CbFltAccessFlags AccessFlag);

[C++ (VCL)]
    bool __fastcall AddFilterAccessRule(WideString Mask, unsigned AccessFlag);

[C++ (.NET)]
    bool AddFilterAccessRule(String^ Mask, CbFltAccessFlags AccessFlag);

    bool AddFilterAccessRule(String Mask, CbFltAccessFlags AccessFlag);

    Function AddFilterAccessRule(ByVal Mask As String, ByVal AccessFlag As CbFltAccessFlags) As Boolean


  • Mask - mask of the files to apply the filter to
  • AccessFlag - flags to be set on files that match the Mask

Return values

TRUE / true if the function succeeded or FALSE / false if the function failed.

AccessFlag values


Use this method to add a filter access rule. Access rules allow to automatically process certain requests to the file system, without interference of the application.

For example, if AccessFlag is set to fltReadOnly, all files that match the Mask, will be read-only for all applications.

Process-specific rules are supported.

Read more about masks.

See also

AddFilterCallbackRule     DeleteFilterRule