Exemplo n.º 1
0
        private static int Load(DirectoryXArgs args, List <DirectoryInfo> diList, List <FileInfo> fiList)
        {
            int iterator = 0;

            ///// First Section: Get Folder/File Listing /////
            while (iterator < diList.Count && (args.Limit == 0 || iterator < args.Limit))
            {
                foreach (string dfilter in args.DirectoryFilters)
                {
                    foreach (DirectoryInfo di in diList[iterator].GetDirectories(dfilter))
                    {
                        diList.Add(di);
                    }

                    foreach (string ffilter in args.FileFilters)
                    {
                        foreach (FileInfo fi in diList[iterator].GetFiles(ffilter))
                        {
                            fiList.Add(fi);
                        }
                    }
                }
                iterator++;
            }
            return(iterator);
        }
Exemplo n.º 2
0
        private static int Load(DirectoryXArgs args, List<DirectoryInfo> diList, List<FileInfo> fiList)
        {
            int iterator = 0;

            ///// First Section: Get Folder/File Listing /////
            while (iterator < diList.Count && (args.Limit == 0 || iterator < args.Limit))
            {
                foreach (string dfilter in args.DirectoryFilters)
                {
                    foreach (DirectoryInfo di in diList[iterator].GetDirectories(dfilter))
                        diList.Add(di);

                    foreach (string ffilter in args.FileFilters)
                    {
                        foreach (FileInfo fi in diList[iterator].GetFiles(ffilter))
                            fiList.Add(fi);
                    }
                }
                iterator++;
            }
            return iterator;
        }