49 references to IsDirectorySeparator
System.Private.CoreLib (49)
src\libraries\Common\src\System\IO\PathInternal.cs (12)
16internal static bool StartsWithDirectorySeparator(ReadOnlySpan<char> path) => path.Length > 0 && IsDirectorySeparator(path[0]); 37&& (commonChars == second.Length || IsDirectorySeparator(second[commonChars]))) 40if (commonChars == second.Length && IsDirectorySeparator(first[commonChars])) 44while (commonChars > 0 && !IsDirectorySeparator(first[commonChars - 1])) 131if (IsDirectorySeparator(path[skip - 1])) 146if (IsDirectorySeparator(c) && i + 1 < path.Length) 150if (IsDirectorySeparator(path[i + 1])) 157if ((i + 2 == path.Length || IsDirectorySeparator(path[i + 2])) && 167(i + 3 == path.Length || IsDirectorySeparator(path[i + 3])) && 174if (IsDirectorySeparator(sb[s])) 228!string.IsNullOrEmpty(path) && IsDirectorySeparator(path[^1]); 242path.Length > 0 && IsDirectorySeparator(path[^1]);
src\libraries\Common\src\System\IO\PathInternal.Unix.cs (5)
24return path.Length > 0 && IsDirectorySeparator(path[0]) ? 1 : 0; 49if (IsDirectorySeparator(path[i]) 50&& (i + 1 < path.Length && IsDirectorySeparator(path[i + 1]))) 67if (IsDirectorySeparator(current) 68&& (i + 1 < path.Length && IsDirectorySeparator(path[i + 1])))
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (1)
91&& ((trimmedNewPath.Length == trimmedCurrentPath.Length) || PathInternal.IsDirectorySeparator(newPath[trimmedCurrentPath.Length])))
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (1)
107if (path.Length > 0 && PathInternal.IsDirectorySeparator(path[^1]))
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (4)
286Debug.Assert(PathInternal.IsDirectorySeparator(fullPath[0])); 325if (PathInternal.IsDirectorySeparator(fullPath[i])) 333Debug.Assert(!PathInternal.IsDirectorySeparator(fullPath[i])); 334while (!PathInternal.IsDirectorySeparator(fullPath[i]))
src\libraries\System.Private.CoreLib\src\System\IO\FileSystemInfo.cs (1)
57if (PathInternal.IsDirectorySeparator(ch) || ch == Path.VolumeSeparatorChar)
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (24)
61if (PathInternal.IsDirectorySeparator(ch)) 111if (result && PathInternal.IsDirectorySeparator(fullPath[^1])) 165while (end > rootLength && !PathInternal.IsDirectorySeparator(path[--end])) ; 168while (end > rootLength && PathInternal.IsDirectorySeparator(path[end - 1])) 209if (PathInternal.IsDirectorySeparator(ch)) 338if (PathInternal.IsDirectorySeparator(ch)) 410if (!PathInternal.IsDirectorySeparator(ch)) 431if (!PathInternal.IsDirectorySeparator(ch)) 571if (!PathInternal.IsDirectorySeparator(builder[^1]) && !PathInternal.IsDirectorySeparator(path[0])) 707bool hasSeparator = PathInternal.IsDirectorySeparator(first[^1]) || PathInternal.IsDirectorySeparator(second[0]); 718bool firstHasSeparator = PathInternal.IsDirectorySeparator(first[^1]) || PathInternal.IsDirectorySeparator(second[0]); 719bool secondHasSeparator = PathInternal.IsDirectorySeparator(second[^1]) || PathInternal.IsDirectorySeparator(third[0]); 740NeedSeparator1 = PathInternal.IsDirectorySeparator(first[^1]) || PathInternal.IsDirectorySeparator(second[0]) ? (byte)0 : (byte)1, 741NeedSeparator2 = PathInternal.IsDirectorySeparator(second[^1]) || PathInternal.IsDirectorySeparator(third[0]) ? (byte)0 : (byte)1, 742NeedSeparator3 = PathInternal.IsDirectorySeparator(third[^1]) || PathInternal.IsDirectorySeparator(fourth[0]) ? (byte)0 : (byte)1, 917if (PathInternal.IsDirectorySeparator(relativeTo[i])) 924else if (PathInternal.IsDirectorySeparator(path[commonLength]))
src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (1)
91PathInternal.IsDirectorySeparator(path[path.Length - 1]) ? path :