# FileEntry record struct

> One file in an IFileSource's listing: its path and its length. Enumerate returns them, and a mount's index is built from them.

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

```csharp
public readonly record struct FileEntry
```

One file in an [IFileSource](/docs/api/ifilesource)'s listing: its path and its length. [Enumerate](/docs/api/ifilesource#enumerate) returns them, and a mount's index is built from them.

```csharp
foreach (var file in tree.Enumerate("garrysmod/addons", false))
    Console.WriteLine($"{file.Path} {file.Length}");
```

## Members

### FileEntry (constructor)

```csharp
public FileEntry(VirtualPath Path, long Length)
```

Makes an entry from a path and a length.

### Path (property)

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

The file's full [VirtualPath](/docs/api/virtualpath) from the source's root, not from the folder that was listed.

### Length (property)

```csharp
public long Length { get; init; }
```

The file's length in bytes, as it reads out. For a compressed archive entry that's the length after decompression, as the archive's index records it, not the bytes it takes in the archive.
