DokanHelper Class Reference

Dokan functions helpers for user IDokanOperations2 implementation. More...

Static Public Member Functions

static bool DokanIsNameInExpression (string expression, string name, bool ignoreCase)
 Check whether name Name matches expression Expression. More...
 
static bool DokanIsNameInExpression (ReadOnlySpan< char > expression, ReadOnlySpan< char > name, bool ignoreCase)
 Check whether name Name matches expression Expression. More...
 
static NtStatus ToNtStatus (this Exception?ex)
 Converts an Exception to an NtStatus value for use with native code. More...
 

Detailed Description

Dokan functions helpers for user IDokanOperations2 implementation.

Member Function Documentation

static bool DokanHelper.DokanIsNameInExpression ( string  expression,
string  name,
bool  ignoreCase 
)
static

Check whether name Name matches expression Expression.

This method is mainly used in IDokanOperations.FindFilesWithPattern to filter a list of possible files. For example "F0_&lt;&quot;*" match "f0_001.txt"

See also
See FsRtlIsNameInExpression routine (MSDN)
Parameters
expressionThe matching pattern. Can contain: ?, *, <, ", >.
nameThe string that will be tested.
ignoreCaseWhen set to true a case insensitive match will be performed.
Returns
Returns true if Expression match Name, false otherwise.
static bool DokanHelper.DokanIsNameInExpression ( ReadOnlySpan< char >  expression,
ReadOnlySpan< char >  name,
bool  ignoreCase 
)
inlinestatic

Check whether name Name matches expression Expression.

This method is mainly used in IDokanOperations2.FindFilesWithPattern to filter a list of possible files. For example "F0_&lt;&quot;*" match "f0_001.txt"

See also
See FsRtlIsNameInExpression routine (MSDN)
Parameters
expressionThe matching pattern. Can contain: ?, *, <, ", >.
nameThe string that will be tested.
ignoreCaseWhen set to true a case insensitive match will be performed.
Returns
Returns true if Expression match Name, false otherwise.
static NtStatus DokanHelper.ToNtStatus ( this Exception?  ex)
inlinestatic

Converts an Exception to an NtStatus value for use with native code.

Parameters
exException object to convert.
Returns
NtStatus value corresponding to ex .

The documentation for this class was generated from the following file:
  • DokanHelper.cs