Пример #1
0
        protected Dictionary <string, FileFolderKey> IndexFolder(string path)
        {
            Dictionary <string, FileFolderKey> result = new Dictionary <string, FileFolderKey>();

            string[] directories = Directory.GetDirectories(path);
            foreach (string directory in directories)
            {
                FileFolderKey key = FileFolderKey.GetKey(directory);
                result.Add(Path.GetFileName(directory), key);
            }
            return(result);
        }
Пример #2
0
        protected Dictionary <string, FileFolderKey> IndexFile(string path)
        {
            Dictionary <string, FileFolderKey> result = new Dictionary <string, FileFolderKey>();

            string[] files = Directory.GetFiles(path);
            foreach (string file in files)
            {
                if (IsVideoFile(file))
                {
                    FileFolderKey key = FileFolderKey.GetKey(file);
                    if (IsIgnore(key) == false)
                    {
                        result.Add(Path.GetFileName(file), key);
                    }
                }
            }
            return(result);
        }