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

◆ Copy() [2/2]

static void System.IO.File.Copy ( string sourceFileName,
string destFileName,
bool overwrite )
inlinestatic

Definition at line 52 of file File.cs.

53 {
54 if (sourceFileName == null)
55 {
56 throw new ArgumentNullException("sourceFileName", SR.ArgumentNull_FileName);
57 }
58 if (destFileName == null)
59 {
60 throw new ArgumentNullException("destFileName", SR.ArgumentNull_FileName);
61 }
62 if (sourceFileName.Length == 0)
63 {
64 throw new ArgumentException(SR.Argument_EmptyFileName, "sourceFileName");
65 }
66 if (destFileName.Length == 0)
67 {
68 throw new ArgumentException(SR.Argument_EmptyFileName, "destFileName");
69 }
70 FileSystem.CopyFile(Path.GetFullPath(sourceFileName), Path.GetFullPath(destFileName), overwrite);
71 }

References System.SR.Argument_EmptyFileName, System.SR.ArgumentNull_FileName, System.IO.FileSystem.CopyFile(), and System.IO.Path.GetFullPath().