Fires to allow file access to be dynamically redirected another location.
The 'callback' is called when the 'ReparseFileName' event is emited.
The argument 'e' has the following properties:
e.fileName e.desiredAccess e.reparsedFileName e.newFileName e.resultCode
Applications can use this event to dynamically redirect access to the file or directory specified by FileName to another location.
The DesiredAccess parameter reflects the value that was passed for the similarly-named parameter of the Windows API's CreateFile function. Please refer to Microsoft's documentation for more information.
The ReparsedFileName parameter reflects the default redirection destination. If the specified file or directory matches an existing reparse rule, this parameter's value is generated based on said rule; otherwise, this parameter will reflect the same value as FileName.
The NewFileName parameter specifies an application-defined redirection destination. This parameter's value, if set, must be less than 1024 characters in length.
If the application sets NewFileName to a non-empty value, it will be used as the redirection destination. Otherwise, the value reflected by ReparseFileName will be used as the redirection destination.
The ResultCode parameter will always be 0 when the event is fired. If the event cannot be handled in a "successful" manner for some reason (e.g., a resource isn't available, security checks failed, etc.), set it to a non-zero value to report an appropriate error. Please refer to the Error Reporting and Handling topic for more information.
This event is fired synchronously; please refer to the Event Types topic for more information.