题
我想测试一个包含文件路径的字符串是否存在该文件(类似于 -e
用 Perl 或 os.path.exists()
在 Python 中)在 C# 中。
解决方案
使用:
File.Exists(path)
微软软件定义网络: http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx
编辑:在系统.IO中
不隶属于 StackOverflow
题
我想测试一个包含文件路径的字符串是否存在该文件(类似于 -e
用 Perl 或 os.path.exists()
在 Python 中)在 C# 中。
解决方案
使用:
File.Exists(path)
微软软件定义网络: http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx
编辑:在系统.IO中