将Temporary文件夹里的Logo文件转移到Logo文件夹
/// <summary> /// 将Temporary文件夹里的Logo文件转移到Logo文件夹 /// </summary> /// <param name="new_resume"></param> /// <returns></returns> private bool RemoveToLogo(Resume new_resume) { string destinationPath = new_resume.AvatarPath.Replace("Temporary", "Avatar"); FileInfo file=new FileInfo(new_resume.AvatarPath+"\\"+new_resume.Avatar); string savePath = destinationPath + new_resume.Avatar; //将文件从临时文件夹转到存储相关文件的文件夹 try { if (file.Exists) file.MoveTo(savePath); return true; } catch { return false; } }