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

◆ RemoveDirectoryInternal()

static void System.IO.FileSystem.RemoveDirectoryInternal ( string fullPath,
bool topLevel,
bool allowDirectoryNotEmpty = false )
inlinestaticprivate

Definition at line 490 of file FileSystem.cs.

491 {
493 {
494 return;
495 }
496 int num = Marshal.GetLastWin32Error();
497 switch (num)
498 {
499 case 2:
500 num = 3;
501 goto case 3;
502 case 3:
503 if (!topLevel)
504 {
505 return;
506 }
507 break;
508 case 145:
510 {
511 return;
512 }
513 break;
514 case 5:
515 throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, fullPath));
516 }
517 throw Win32Marshal.GetExceptionForWin32Error(num, fullPath);
518 }
static bool RemoveDirectory(string path)
Definition Interop.cs:1009

References System.SR.Format(), System.IO.Win32Marshal.GetExceptionForWin32Error(), System.Runtime.InteropServices.Marshal.GetLastWin32Error(), Interop.Kernel32.RemoveDirectory(), and System.SR.UnauthorizedAccess_IODenied_Path.

Referenced by System.IO.FileSystem.RemoveDirectory(), and System.IO.FileSystem.RemoveDirectoryRecursive().