protected IEnumerable <IFileInfo> FindMeshes(IDirectoryContents directory) { var inSubDirs = directory.OfType <DirectoryInfo>().Bind(d => FindMeshes(d.Contents)); var inCurrentDir = directory.Filter(f => !f.IsDirectory && f.Name.EndsWith(".mesh")); return(inCurrentDir.Concat(inSubDirs)); }