一、Msdn解释:
If the caller does not have sufficient permissions to read the specified file, no exception is thrown and the method returns false regardless of the existence of path.
如果调用方没有足够的权限读取指定的文件,则不会引发异常,并且无论路径是否存在,方法都返回false。
二、测试
实际情况大部分不是这个原因,最有可能的原因是:文件后缀名造成的
举例,如果电脑中一个文件名为,abc.jpg.bmp,因为隐藏了系统默认隐藏了后缀名,你看到的是abc.jpg,那么
File.Exits(abc.jpg) 为false
File.Exits(abc.jpg.bmp) 为true
忽视了系统隐藏的后缀名