Class FileSystemIncludeResolver
- Namespace
- ShadowDusk.Core.Preprocessor
- Assembly
- ShadowDusk.Core.dll
An IIncludeResolver that resolves #include directives from the file
system, searching first relative to the including file's directory and then the supplied
additional search paths.
public sealed class FileSystemIncludeResolver : IIncludeResolver
- Inheritance
-
FileSystemIncludeResolver
- Implements
- Inherited Members
Methods
Resolve(string, string?, IReadOnlyList<string>)
Resolves a single #include reference to its file path and contents.
public Result<IncludeResolvedFile, ShaderError> Resolve(string includePath, string? includingFilePath, IReadOnlyList<string> additionalSearchPaths)
Parameters
includePathstringThe path as written in the
#includedirective.includingFilePathstringThe file that issued the
#include, or null.additionalSearchPathsIReadOnlyList<string>Extra directories to search, in order.
Returns
- Result<IncludeResolvedFile, ShaderError>
The resolved file (path + text) on success, or a ShaderError (e.g. IncludeNotFound) on failure.