diff options
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/IO/PathInternal.Windows.cs')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/IO/PathInternal.Windows.cs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/System.Private.CoreLib/shared/System/IO/PathInternal.Windows.cs b/src/System.Private.CoreLib/shared/System/IO/PathInternal.Windows.cs index 81d51ba4b..5f9ee0e02 100644 --- a/src/System.Private.CoreLib/shared/System/IO/PathInternal.Windows.cs +++ b/src/System.Private.CoreLib/shared/System/IO/PathInternal.Windows.cs @@ -70,7 +70,7 @@ namespace System.IO return ((value >= 'A' && value <= 'Z') || (value >= 'a' && value <= 'z')); } - private static bool EndsWithPeriodOrSpace(string path) + internal static bool EndsWithPeriodOrSpace(string path) { if (string.IsNullOrEmpty(path)) return false; @@ -130,7 +130,7 @@ namespace System.IO // In any case, all internal usages should be hitting normalize path (Path.GetFullPath) before they hit this // shimming method. (Or making a change that doesn't impact normalization, such as adding a filename to a // normalized base path.) - if (IsPartiallyQualified(path) || IsDevice(path)) + if (IsPartiallyQualified(path.AsSpan()) || IsDevice(path.AsSpan())) return path; // Given \\server\share in longpath becomes \\?\UNC\server\share @@ -270,19 +270,6 @@ namespace System.IO return i; } - private static bool StartsWithOrdinal(ReadOnlySpan<char> source, string value) - { - if (source.Length < value.Length) - return false; - - for (int i = 0; i < value.Length; i++) - { - if (value[i] != source[i]) - return false; - } - return true; - } - /// <summary> /// Returns true if the path specified is relative to the current drive or working directory. /// Returns false if the path is fixed to a specific drive or UNC path. This method does no |