简体   繁体   中英

How to get folders and its files from the Directory

I have paths in text files that has retrieved files. But i need now to retrieve the folders and files from the path.How will achieve this.

var dir = new DirectoryInfo(path);
var subdirs = dir.GetDirectories();
var files = dir.GetFiles();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM