using System.Collections.Immutable; namespace StellaOps.Scanner.EntryTrace; /// /// Represents a layered read-only filesystem snapshot built from container layers. /// public interface IRootFileSystem { /// /// Attempts to resolve an executable by name using the provided PATH entries. /// bool TryResolveExecutable(string name, IReadOnlyList searchPaths, out RootFileDescriptor descriptor); /// /// Attempts to read the contents of a file as UTF-8 text. /// bool TryReadAllText(string path, out RootFileDescriptor descriptor, out string content); /// /// Returns descriptors for entries contained within a directory. /// ImmutableArray EnumerateDirectory(string path); /// /// Checks whether a directory exists. /// bool DirectoryExists(string path); } /// /// Describes a file discovered within the layered filesystem. /// public sealed record RootFileDescriptor( string Path, string? LayerDigest, bool IsExecutable, bool IsDirectory, string? ShebangInterpreter);