CallbackFilter.AddReparseFileNameRule method


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

CallbackFilter     See also    


This method adds access redirection rule.


    function AddReparseFileNameRule( Mask : TCBString; ReparseMask : TCBString; ProductName : AnsiString ): boolean;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    bool AddReparseFileNameRule( LPCWSTR Mask, LPCWSTR ReparseMask, LPCSTR ProductName );

[C++ (VCL)]
    bool __fastcall AddReparseFileNameRule( WideString Mask, WideString ReparseMask, AnsiString ProductName );

[C++ (.NET)]
    bool AddReparseFileNameRule( String^ Mask, String^ ReparseMask, String^ ProductName );

    bool AddReparseFileNameRule( String Mask, String ReparseMask, String ProductName );

    Function AddReparseFileNameRule( ByVal Mask As String, ByVal ReparseMask As String, ByVal ProductName As String) As Boolean


  • Mask - mask of the files to apply the filter to
  • ReparseMask - the mask that is used to create the name of the file to redirect access to
  • ProductName - the name or symbolic identifier of the program that has set the rule

Return values

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


Use this method to add a rule for redirecting file access.

Use Mask parameter to define, access to which files is redirected. Use ReparseMask parameter to compose the file name of the file that access is redirected to. If Mask contains the wildcard (* or ? symbol), the corresponding symbols of ReparseMask are replaced with the text, that matches this symbol in mask. Eg.: Mask == "*.txt", ReparseMask == "*_1.txt", the file "text.txt" will be redirected to "text_1.txt".

Read more about masks.

See also

DeleteAllReparseFileNameRules     DeleteReparseFileNameRule     GetReparseFileNameRule     GetReparseFileNameRulesCount