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