Created
March 9, 2018 01:33
-
-
Save JeremyKuhne/5b14ed5d33397a8b7108be7726efbc2f to your computer and use it in GitHub Desktop.
FileSystemName
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.IO.Enumeration | |
{ | |
public static class FileSystemName | |
{ | |
// Change '*' and '?' to '<', '>', and '"' to match Win32 behavior | |
public static string TranslateWin32Expression(string expression); | |
// This matches '*', '?', '<', '>', and '"' wildcards | |
public static bool MatchesWin32Expression(ReadOnlySpan<char> expression, ReadOnlySpan<char> name, bool ignoreCase = true); | |
// This matches just '*' and '?' wildcards | |
public static bool MatchesSimpleExpression(ReadOnlySpan<char> expression, ReadOnlySpan<char> name, bool ignoreCase = true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment