標(biāo)題是不言自明的。我想知道如果文件夾中有子目錄,我如何獲得子目錄的完整路徑。這是我必須檢查文件夾中是否有任何子目錄的內(nèi)容。 private void button2_Click_1(object sender, EventArgs e) { bool hasSubfolders; string SubFolderFullPath = heyman + "/dump"; DirectoryInfo directory = new DirectoryInfo(SubFolderFullPath); DirectoryInfo[] subdirs = directory.GetDirectories(); if (subdirs.Length == 0) MessageBox.Show("Dossier dump vide..."); }
- 1 回答
- 0 關(guān)注
- 145 瀏覽
添加回答
舉報(bào)
0/150
提交
取消