/// <summary> /// Gets the playable stream files. /// </summary> /// <param name="rootPath">The root path.</param> /// <returns>List{System.String}.</returns> public List <string> GetPlayableStreamFiles(string rootPath) { var allFiles = Directory.EnumerateFiles(rootPath, "*", SearchOption.AllDirectories).ToList(); return(PlayableStreamFileNames.Select(name => allFiles.FirstOrDefault(f => string.Equals(System.IO.Path.GetFileName(f), name, StringComparison.OrdinalIgnoreCase))) .Where(f => !string.IsNullOrEmpty(f)) .ToList()); }
/// <summary> /// Gets the playable stream files. /// </summary> /// <param name="rootPath">The root path.</param> /// <returns>List{System.String}.</returns> public List <string> GetPlayableStreamFiles(string rootPath) { var allFiles = FileSystem.GetFilePaths(rootPath, true).ToList(); return(PlayableStreamFileNames.Select(name => allFiles.FirstOrDefault(f => string.Equals(System.IO.Path.GetFileName(f), name, StringComparison.OrdinalIgnoreCase))) .Where(f => !string.IsNullOrEmpty(f)) .ToList()); }