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

◆ Normalize() [1/2]

static string System.IO.PathHelper.Normalize ( ref ValueStringBuilder path)
inlinestaticpackage

Definition at line 18 of file PathHelper.cs.

19 {
20 Span<char> initialBuffer = stackalloc char[260];
21 ValueStringBuilder builder = new ValueStringBuilder(initialBuffer);
22 GetFullPathName(path.AsSpan(terminate: true), ref builder);
23 string result = ((builder.AsSpan().IndexOf('~') >= 0) ? TryExpandShortFileName(ref builder, null) : builder.ToString());
24 builder.Dispose();
25 return result;
26 }
static string TryExpandShortFileName(ref ValueStringBuilder outputBuilder, string originalPath)
Definition PathHelper.cs:64
static void GetFullPathName(ReadOnlySpan< char > path, ref ValueStringBuilder builder)
Definition PathHelper.cs:28
ReadOnlySpan< char > AsSpan(bool terminate)

References System.Text.ValueStringBuilder.AsSpan(), System.Text.ValueStringBuilder.Dispose(), System.IO.PathHelper.GetFullPathName(), System.Text.ValueStringBuilder.ToString(), and System.IO.PathHelper.TryExpandShortFileName().