private List <File> ScanFiles() { string[] files = Directory.GetFiles(_path); List <File> filesList = new List <File>(); for (int i = 0; i < files.Length; i++) { var file = files[i]; if (!file.Contains(".")) { continue; } // Continue on files that have no extension if (_manager.GetExtensions().ContainsKey(file.Substring(file.LastIndexOf(".")))) { filesList.Add(new File(_path, file.Substring(file.LastIndexOf("\\") + 1), _manager, this, _level)); } } return(filesList); }