Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetUncRootLength()

static int System.IO.Path.GetUncRootLength ( ReadOnlySpan< char > path)
inlinestaticpackage

Definition at line 1056 of file Path.cs.

1057 {
1058 bool flag = PathInternal.IsDevice(path);
1059 if (!flag && path.Slice(0, 2).EqualsOrdinal("\\\\".AsSpan()))
1060 {
1061 return 2;
1062 }
1063 if (flag && path.Length >= 8 && (path.Slice(0, 8).EqualsOrdinal("\\\\?\\UNC\\".AsSpan()) || path.Slice(5, 4).EqualsOrdinal("UNC\\".AsSpan())))
1064 {
1065 return 8;
1066 }
1067 return -1;
1068 }
ReadOnlySpan< T > Slice(int start)

References System.IO.PathInternal.IsDevice(), System.ReadOnlySpan< T >.Length, and System.ReadOnlySpan< T >.Slice().

Referenced by System.IO.Path.GetVolumeName().