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

◆ GetFullPathName()

static void System.IO.PathHelper.GetFullPathName ( ReadOnlySpan< char > path,
ref ValueStringBuilder builder )
inlinestaticprivate

Definition at line 28 of file PathHelper.cs.

29 {
30 uint fullPathNameW;
31 while ((fullPathNameW = Interop.Kernel32.GetFullPathNameW(ref MemoryMarshal.GetReference(path), (uint)builder.Capacity, ref builder.GetPinnableReference(), IntPtr.Zero)) > builder.Capacity)
32 {
33 builder.EnsureCapacity(checked((int)fullPathNameW));
34 }
35 if (fullPathNameW == 0)
36 {
37 int num = Marshal.GetLastWin32Error();
38 if (num == 0)
39 {
40 num = 161;
41 }
42 throw Win32Marshal.GetExceptionForWin32Error(num, path.ToString());
43 }
44 builder.Length = (int)fullPathNameW;
45 }
static uint GetFullPathNameW(ref char lpFileName, uint nBufferLength, ref char lpBuffer, IntPtr lpFilePart)
override string ToString()

References System.IO.Win32Marshal.GetExceptionForWin32Error(), Interop.Kernel32.GetFullPathNameW(), System.Runtime.InteropServices.Marshal.GetLastWin32Error(), System.ReadOnlySpan< T >.ToString(), and System.IntPtr.Zero.

Referenced by System.IO.PathHelper.Normalize(), and System.IO.PathHelper.Normalize().