Example #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);
        }
Example #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);
        }
Example #3
0
 protected bool IsIgnore(FileFolderKey file)
 {
     if (Path.GetExtension(file.FolderName).ToUpper() == ".EXE")
     {
         return(true);
     }
     if (Path.GetExtension(file.FolderName).ToUpper() == ".PDB")
     {
         return(true);
     }
     if (Path.GetExtension(file.FolderName).ToUpper() == ".MANIFEST")
     {
         return(true);
     }
     if (Path.GetExtension(file.FolderName).ToUpper() == ".CONFIG")
     {
         return(true);
     }
     return(false);
 }
Example #4
0
 protected void DoMove(FileFolderKey file, string folder)
 {
     File.Move(file.FolderName, Path.Combine(folder, file.FolderShortName));
 }
Example #5
0
 protected string GetNewFolderName(FileFolderKey file)
 {
     return(FileFolderKey.GetNewFolder(file.FolderName));
 }