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); }
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); }
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); }
protected void DoMove(FileFolderKey file, string folder) { File.Move(file.FolderName, Path.Combine(folder, file.FolderShortName)); }
protected string GetNewFolderName(FileFolderKey file) { return(FileFolderKey.GetNewFolder(file.FolderName)); }