Acquired recursively specific file folder

void ReadFilePath public (String path)
        {
            String [] = dirs Directory.GetFileSystemEntries (path); // get the file directory and file name
            for (int I = 0; I <dirs.Length; I ++)
            {
                IF (Directory.Exists ( dirs [i])) // if the folder, the recursive calls
                {
                    ReadFilePath (dirs [I]);
                }
                the else
                {
                    IF (Path.GetFileName (dirs [I]) == "xxx.yyy")
                    {

        }
                }
            }
        }

Guess you like

Origin www.cnblogs.com/mol1995/p/10993929.html