How can I perform full recursive directory & file scan?

后端 未结 6 1183
囚心锁ツ
囚心锁ツ 2020-12-11 01:38

here is my code:

    private static void TreeScan(string sDir)
    {
        foreach (string d in Directory.GetDirectories(sDir))
        {
            forea         


        
6条回答
  •  天涯浪人
    2020-12-11 02:15

    You have to use

    Directory.GetFiles(targetDirectory);
    

    like in This sample, wich contains a complete implementation of what you're looking for

提交回复
热议问题