From: Ilya Date: Sun, 8 Aug 2021 20:32:20 +0000 (+0500) Subject: Remove HasWildCardCharacters method (#57028) X-Git-Tag: accepted/tizen/unified/20220110.054933~562 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c29660edeb35ef8f5da34d8ef07a32fefb136923;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Remove HasWildCardCharacters method (#57028) It is not used any more. --- diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.Windows.cs index dd9442b..b1767b3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/PathInternal.Windows.cs @@ -172,29 +172,6 @@ namespace System.IO } /// - /// Check for known wildcard characters. '*' and '?' are the most common ones. - /// - internal static bool HasWildCardCharacters(ReadOnlySpan path) - { - // Question mark is part of dos device syntax so we have to skip if we are - int startIndex = IsDevice(path) ? ExtendedPathPrefix.Length : 0; - - // [MS - FSA] 2.1.4.4 Algorithm for Determining if a FileName Is in an Expression - // https://msdn.microsoft.com/en-us/library/ff469270.aspx - for (int i = startIndex; i < path.Length; i++) - { - char c = path[i]; - if (c <= '?') // fast path for common case - '?' is highest wildcard character - { - if (c == '\"' || c == '<' || c == '>' || c == '*' || c == '?') - return true; - } - } - - return false; - } - - /// /// Gets the length of the root of the path (drive, share, etc.). /// internal static int GetRootLength(ReadOnlySpan path)