Skip to content
EvilEngine.Mounts

FileEntry record struct

public readonly record struct FileEntry

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

foreach (var file in tree.Enumerate("garrysmod/addons", false))
    Console.WriteLine($"{file.Path} {file.Length}");
Assembly
EvilEngine.Mounts
Commit
4ff877b1

Members

FileEntry constructor

public FileEntry(VirtualPath Path, long Length)

Makes an entry from a path and a length.

Path property

public VirtualPath Path { get; init; }

The file’s full VirtualPath from the source’s root, not from the folder that was listed.

Length property

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.