码迷,mamicode.com
首页 > 其他好文 > 详细

将Temporary文件夹里的Logo文件转移到Logo文件夹

时间:2015-01-11 12:16:13      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:

  /// <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;
            }
        }

 

将Temporary文件夹里的Logo文件转移到Logo文件夹

标签:

原文地址:http://www.cnblogs.com/wiming/p/4216243.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!