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

◆ TotalFreeSpace

long System.IO.DriveInfo.TotalFreeSpace
get

Definition at line 60 of file DriveInfo.cs.

61 {
62 get
63 {
64 uint lpOldMode;
65 bool flag = global::Interop.Kernel32.SetThreadErrorMode(1u, out lpOldMode);
66 try
67 {
68 if (!global::Interop.Kernel32.GetDiskFreeSpaceEx(Name, out var _, out var _, out var freeBytes))
69 {
70 throw Error.GetExceptionForLastWin32DriveError(Name);
71 }
72 return freeBytes;
73 }
74 finally
75 {
76 if (flag)
77 {
78 global::Interop.Kernel32.SetThreadErrorMode(lpOldMode, out var _);
79 }
80 }
81 }
82 }