删除指定位置的图片和文件

/// <summary>
/// 删除指定位置的图片和文件
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
protected static bool FilePicDelete(string path)
{
bool ret = false;
System.IO.FileInfo file = new System.IO.FileInfo(path);
if (file.Exists)
{
file.Delete();
ret = true;
}
return ret;
}

posted on 2015-08-13 15:32  暴风雪00  阅读(390)  评论(0编辑  收藏  举报