C#IO

System.IO 命名空间包含允许读写文件和数据流的类型以及提供基本文件和目录支持的类型。

  

        string url = @"C:chisp.log";
        if (System.IO.File.Exists(url))
        {
            Response.Write("文件存在");
        }
        else
        { Response.Write("文件不存在"); }

  

System.IO.File.Exists(url)返回的是true,false
原文地址:https://www.cnblogs.com/RebornC/p/6730123.html