using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.IO;

namespace GetCommand
{
    public class DeleImage
    {
        /// <summary>
        /// 删除服务器上的图片
        /// </summary>
        /// <param name="filepath"></param>
        public static void image_server_del(string image_path_head, string image_path_body)
        {
            string filepath = HttpContext.Current.Server.MapPath("/") + image_path_head + "/" + image_path_body;
            if (File.Exists(filepath))
            {
                File.Delete(filepath);
            }
        }

        /// <summary>
        /// 删除个人的图像
        /// </summary>
        /// <param name="user_image"></param>
        public static void personal_image_del(string user_image)
        {
            string image_path = HttpContext.Current.Server.MapPath(user_image);
            if (File.Exists(image_path))
            {
                File.Delete(image_path);
            }
        }
    }
}
