Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ CombineInternal() [3/3]

static string System.IO.Path.CombineInternal ( string first,
string second,
string third,
string fourth )
inlinestaticprivate

Definition at line 608 of file Path.cs.

609 {
610 if (string.IsNullOrEmpty(first))
611 {
612 return CombineInternal(second, third, fourth);
613 }
614 if (string.IsNullOrEmpty(second))
615 {
616 return CombineInternal(first, third, fourth);
617 }
618 if (string.IsNullOrEmpty(third))
619 {
620 return CombineInternal(first, second, fourth);
621 }
622 if (string.IsNullOrEmpty(fourth))
623 {
624 return CombineInternal(first, second, third);
625 }
626 if (IsPathRooted(fourth.AsSpan()))
627 {
628 return fourth;
629 }
630 if (IsPathRooted(third.AsSpan()))
631 {
632 return CombineInternal(third, fourth);
633 }
634 if (IsPathRooted(second.AsSpan()))
635 {
636 return CombineInternal(second, third, fourth);
637 }
638 return JoinInternal(first.AsSpan(), second.AsSpan(), third.AsSpan(), fourth.AsSpan());
639 }
static string CombineInternal(string first, string second)
Definition Path.cs:566
static bool IsPathRooted([NotNullWhen(true)] string? path)
Definition Path.cs:985
static string JoinInternal(ReadOnlySpan< char > first, ReadOnlySpan< char > second)
Definition Path.cs:641

References System.IO.Path.CombineInternal(), System.IO.Path.IsPathRooted(), and System.IO.Path.JoinInternal().