コード例 #1
0
ファイル: DirectoryX.cs プロジェクト: unixcrh/Motion
        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);
        }
コード例 #2
0
ファイル: DirectoryX.cs プロジェクト: zhuangyy/Motion
        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;
        }