# LayerSource.Container record

> A layer source that's an archive or disc image inside a tree, opened through the first registered container that recognises it. It opens the first time something reads from the layer, so a mount with dozens of archives opens without reading them. An archive that fails to open is tried again on the next read, so one half written while Steam updates it reads once it's whole. A layer that can't be listed when the mount first reads its files, such as a damaged archive, is left out with a note on the mount and the rest of the mount reads on.

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

```csharp
public sealed record LayerSource.Container : LayerSource
```

A [layer source](/docs/api/layersource) that's an archive or disc image inside a tree, opened through the first registered [container](/docs/api/icontaineradapter) that recognises it. It opens the first time something reads from the layer, so a mount with dozens of archives opens without reading them. An archive that fails to open is tried again on the next read, so one half written while Steam updates it reads once it's whole. A layer that can't be listed when the mount first reads its files, such as a damaged archive, is left out with a note on the mount and the rest of the mount reads on.

```csharp
new LayerSource.Container(tree, "id1/PAK0.PAK") { At = "id1" }
```

## Members

### LayerSource.Container (constructor)

```csharp
public LayerSource.Container(IFileSource Parent, VirtualPath Path)
```

Makes the source from the tree the archive is in and its path there.

### Parent (property)

```csharp
public IFileSource Parent { get; init; }
```

The tree the archive is in.

### Path (property)

```csharp
public VirtualPath Path { get; init; }
```

The archive's path in [Parent](#parent).

### At (property)

```csharp
public VirtualPath At { get; init; }
```

The folder in the mount where the archive's contents go, the root unless set. Quake's PAKs sit at their game folder, so `PAK0.PAK`'s `maps/e1m1.bsp` reads as `id1/maps/e1m1.bsp`.

### Inside (property)

```csharp
public VirtualPath Inside { get; init; }
```

A folder inside the archive to lay instead of its whole tree, the root unless set.
