是否包含目录

if (Directory.Exists(path))
{
string[] name = Directory.GetFiles(path);

foreach (string item in name)
{
file += item + "---";
}
}

原文地址:https://www.cnblogs.com/123ing/p/3809762.html