我想测试包含文件路径是否存在该文件(有点像 -e
测试在Perl或 os.path.exists()在Python)在C#。
I would like to test a string containing a path to a file for existence of that file (something like the -e
test in Perl or the os.path.exists()
in Python) in C#.
使用:
File.Exists(path)
MSDN:http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx
编辑:System.IO
In System.IO