Method to get all files within folder and subfolders that will return a list

前端 未结 8 1151
别跟我提以往
别跟我提以往 2020-12-04 17:30

I have a method that will iterate through a folder and all of its subfolders and get a list of the file paths. However, I could only figure out how to create it and add the

8条回答
  •  暖寄归人
    2020-12-04 18:16

    String[] allfiles = System.IO.Directory.GetFiles("path/to/dir", "*.*", System.IO.SearchOption.AllDirectories);
    

提交回复
热议问题