static IEnumerable<IAbsoluteDirectoryPath> ExistingMods(IAbsoluteDirectoryPath[] paths, params string[] mods) { return paths.Any() ? mods.Select( x => paths.Select(path => path.GetChildDirectoryWithName(x)).FirstOrDefault(p => p.Exists)) .Where(x => x != null) : Enumerable.Empty<IAbsoluteDirectoryPath>(); }