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

◆ CopyFile() [2/2]

void System.IO.IsolatedStorage.IsolatedStorageFile.CopyFile ( string sourceFileName,
string destinationFileName,
bool overwrite )
inline

Definition at line 348 of file IsolatedStorageFile.cs.

349 {
350 if (sourceFileName == null)
351 {
352 throw new ArgumentNullException("sourceFileName");
353 }
354 if (destinationFileName == null)
355 {
356 throw new ArgumentNullException("destinationFileName");
357 }
358 if (sourceFileName.Length == 0)
359 {
360 throw new ArgumentException(System.SR.Argument_EmptyPath, "sourceFileName");
361 }
362 if (destinationFileName.Length == 0)
363 {
364 throw new ArgumentException(System.SR.Argument_EmptyPath, "destinationFileName");
365 }
367 string fullPath = GetFullPath(sourceFileName);
368 string fullPath2 = GetFullPath(destinationFileName);
369 try
370 {
371 File.Copy(fullPath, fullPath2, overwrite);
372 }
373 catch (FileNotFoundException)
374 {
375 throw new FileNotFoundException(System.SR.Format(System.SR.PathNotFound_Path, sourceFileName));
376 }
377 catch (PathTooLongException)
378 {
379 throw;
380 }
381 catch (Exception rootCause)
382 {
384 }
385 }
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.File.Copy(), System.IO.IsolatedStorage.IsolatedStorageFile.EnsureStoreIsValid(), System.SR.Format(), System.IO.IsolatedStorage.IsolatedStorageFile.GetFullPath(), System.IO.IsolatedStorage.IsolatedStorageFile.GetIsolatedStorageException(), System.SR.IsolatedStorage_Operation, and System.SR.PathNotFound_Path.