Beispiel #1
0
        public void loadData(DVType.FileType dvt_FileType)
        {
            DirectoryInfo diFolder;

            while (que_str_Locations.Count > 0)
            {

                diFolder = new DirectoryInfo(que_str_Locations.Dequeue());

                foreach (FileInfo temp in diFolder.GetFiles())
                {
                    if (DVType.isMatchingExtention(temp.Extension, dvt_FileType))
                        lst_dvf_FileList.Add(new DVFile(temp.FullName));
                }

                foreach (DirectoryInfo temp in diFolder.GetDirectories())
                {
                    que_str_Locations.Enqueue(temp.FullName);
                }

            }
        }
Beispiel #2
0
        public static Boolean isMatchingExtention(String str_Extention, FileType type)
        {
            DVType dvt = new DVType();

            switch (type)
            {
                case FileType.All:
                    return true;

                case FileType.Audio:
                    return dvt.isAudio(str_Extention);

                case FileType.Video:
                    return dvt.isVideo(str_Extention);

                case FileType.Image:
                    return dvt.isImage(str_Extention);

                default:
                    return false;
            }
        }