C#IO
System.IO 命名空間包含允許讀寫(xiě)文件和數(shù)據(jù)流的類(lèi)型以及提供基本文件和目錄支持的類(lèi)型。
string url = @"C:\chisp.log";if (System.IO.File.Exists(url)){Response.Write("文件存在");}else{ Response.Write("文件不存在"); }
System.IO.File.Exists(url)返回的是true,false
轉(zhuǎn)載于:https://www.cnblogs.com/RebornC/p/6730123.html
總結(jié)
- 上一篇: solr5.5索引mysql数据(新手总
- 下一篇: C# 字符、字符串过滤,只能输入数字、中