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

◆ MoveDirectory()

void System.IO.IsolatedStorage.IsolatedStorageFile.MoveDirectory ( string sourceDirectoryName,
string destinationDirectoryName )
inline

Definition at line 426 of file IsolatedStorageFile.cs.

427 {
428 if (sourceDirectoryName == null)
429 {
430 throw new ArgumentNullException("sourceDirectoryName");
431 }
432 if (destinationDirectoryName == null)
433 {
434 throw new ArgumentNullException("destinationDirectoryName");
435 }
436 if (sourceDirectoryName.Length == 0)
437 {
438 throw new ArgumentException(System.SR.Argument_EmptyPath, "sourceDirectoryName");
439 }
440 if (destinationDirectoryName.Length == 0)
441 {
442 throw new ArgumentException(System.SR.Argument_EmptyPath, "destinationDirectoryName");
443 }
445 string fullPath = GetFullPath(sourceDirectoryName);
446 string fullPath2 = GetFullPath(destinationDirectoryName);
447 try
448 {
449 Directory.Move(fullPath, fullPath2);
450 }
451 catch (DirectoryNotFoundException)
452 {
453 throw new DirectoryNotFoundException(System.SR.Format(System.SR.PathNotFound_Path, sourceDirectoryName));
454 }
455 catch (PathTooLongException)
456 {
457 throw;
458 }
459 catch (Exception rootCause)
460 {
462 }
463 }
static Exception GetIsolatedStorageException(string exceptionMsg, Exception rootCause)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Argument_EmptyPath
Definition SR.cs:38
static string IsolatedStorage_Operation
Definition SR.cs:22
static string PathNotFound_Path
Definition SR.cs:40
Definition SR.cs:7

References System.SR.Argument_EmptyPath, System.IO.IsolatedStorage.IsolatedStorageFile.EnsureStoreIsValid(), System.SR.Format(), System.IO.IsolatedStorage.IsolatedStorageFile.GetFullPath(), System.IO.IsolatedStorage.IsolatedStorageFile.GetIsolatedStorageException(), System.SR.IsolatedStorage_Operation, System.IO.Directory.Move(), and System.SR.PathNotFound_Path.