asp.net(C#)判断指定的文件是否存在
-
- //文件不存在就创建
- if(!File.Exists(System.web.HttpContext.Current.Server.MapPath(path)))
- {
- File.Create(System.Web.HttpContext.Current.Server.MapPath(path)).Close();
- }
- //该片段来自于http://www.codesnippet.cn/detail/260720134839.html
来源: http://www.codesnippet.cn/detail/260720134839.html