public static CopyFile ( String fromFile, String toFile, bool overWrite = true ) : bool | ||
fromFile | String | the source file path |
toFile | String | the destination file path |
overWrite | bool | overwrite if exist |
리턴 | bool |
public static bool CopyFile(String fromFile, String toFile, bool overWrite = true)
{
try
{
File.Copy(fromFile, toFile, overWrite);
return true;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message + " >" + ex.StackTrace);
return false;
}
}
/// <summary>