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

◆ MoveFile()

void System.IO.IsolatedStorage.IsolatedStorageFile.MoveFile ( string sourceFileName,
string destinationFileName )
inline

Definition at line 387 of file IsolatedStorageFile.cs.

388 {
389 if (sourceFileName == null)
390 {
391 throw new ArgumentNullException("sourceFileName");
392 }
393 if (destinationFileName == null)
394 {
395 throw new ArgumentNullException("destinationFileName");
396 }
397 if (sourceFileName.Length == 0)
398 {
399 throw new ArgumentException(System.SR.Argument_EmptyPath, "sourceFileName");
400 }
401 if (destinationFileName.Length == 0)
402 {
403 throw new ArgumentException(System.SR.Argument_EmptyPath, "destinationFileName");
404 }
406 string fullPath = GetFullPath(sourceFileName);
407 string fullPath2 = GetFullPath(destinationFileName);
408 try
409 {
410 File.Move(fullPath, fullPath2);
411 }
412 catch (FileNotFoundException)
413 {
414 throw new FileNotFoundException(System.SR.Format(System.SR.PathNotFound_Path, sourceFileName));
415 }
416 catch (PathTooLongException)
417 {
418 throw;
419 }
420 catch (Exception rootCause)
421 {
423 }
424 }
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.File.Move(), and System.SR.PathNotFound_Path.