Exemple #1
0
        public void findFiles(string path)
        {
            if (patterns.Count == 0)
            {
                patterns.Add("*.*");
            }
            path = Path.GetFullPath(path);
            Display.displayDirectory(act, path);

            foreach (string pattern in patterns)
            {
                files.AddRange(Directory.GetFiles(path, pattern));
            }
            if (recurse)
            {
                string[] directories = Directory.GetDirectories(path);
                foreach (string dir in directories)
                {
                    findFiles(dir);
                }
            }
        }