# IFinder interface

> Finds the games a storefront has installed on this machine, so the player doesn't have to point at each folder by hand. An adapter registers one with AddFinder.

Namespace `EvilEngine.Mounts`, assembly `EvilEngine.Mounts`. Engine commit 4ff877b1.

```csharp
public interface IFinder
```

Finds the games a storefront has installed on this machine, so the player doesn't have to point at each folder by hand. An adapter registers one with [AddFinder](/docs/api/adaptercontext#addfinder).

The `steam` adapter's `SteamFinder` is the one finder so far. It reads Steam's own library files, `libraryfolders.vdf` and each library's `appmanifest_*.acf`, in every library Steam knows on every drive, and lists the apps Steam has fully installed.

A finder only lists installs. It never saves anything: the main menu probes each install in the background, offers the ones an installed adapter recognises under Available games, and saves a pointer only when the player ticks one.

## Members

### Store (property)

```csharp
string Store { get; }
```

The storefront's name, such as `steam`. The main menu shows it, capitalised, as "Found by" on a game's card. A game adapter's external that carries a store hint is looked up through the finders whose `Store` matches the hint's name.

### TryFind (method)

```csharp
bool TryFind(string key, out string? path)
```

Looks up one install by the store's own key and returns its folder. Steam's keys are `app/<id>`, as in `app/4000` for Garry's Mod. The mount core calls it when a game adapter declares an external with a store hint for this store, as Garry's Mod does for each Source game depot it can mount, `app/240` for Counter-Strike: Source.

### Installs (method)

```csharp
IReadOnlyList<FoundInstall> Installs()
```

Lists every install the store has on this machine, as `FoundInstall` records: the store, the key, a title and the folder, plus any `FoundArt` (capsule, header, hero and logo images) the store has cached for it. The main menu uses the art for the game's card.

It runs once the boot is done and again when the player presses Look again, off the main thread. Return an empty list rather than throwing when the store isn't installed. Installs from every finder are merged, and when two point at the same folder the first one wins.

### Art (method)

```csharp
FoundArt Art(string key)
```

Returns the `FoundArt` the store has cached for one key, the same images `Installs` hands back with each install, without listing every install first. The steam finder reads `app/<id>` from its library cache whether or not the app is still installed. A finder that holds no art leaves the default, which returns `FoundArt.None`.

The mount registry looks it up by store and key through its own `Art`. The main menu's Soundtracks tab uses it for each soundtrack game's header, by its albums' store key, so the episodes and Lost Coast get their own art.
