11智能在线
新记
判断一个路径是否是目录 判断是文件夹还是文件
如题所述
举报该文章
相关建议 2016-04-12
string path = @"D:\aaa";
if (Directory.Exists(path))
{
Console.WriteLine("æ件夹");
}
else
{
if (File.Exists(path))
{
Console.WriteLine("æ件");
}
else
{
Console.WriteLine("æ æè·¯å¾");
}
}
Console.Read();
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/f482psqm47qf2fpf2s4.html
其他看法
无其他回答
相似回答
大家正在搜
相关问题
如何判断一个文件夹里是否有文件,文件夹的路径知道了
c#如何判断一个路径是文件还是文件夹
java判断文件是文件夹还是文件?
java中如何判断一个路径是文件还是文件夹
判断一个路径是否是目录 判断是文件夹还是文件
判断一个路径是文件还是文件夹
判断C#是文件还是文件夹?
如何判断一个路径是目录还是文件