GetContainingInputPath(IReadOnlyFileSystem, NormalizedPath) Method
Gets the absolute input path that contains the specified file or directory. If the provided file or directory path is absolute, this returns the input path that contains the specified path (note that the specified file or directory does not need to exist and this just returns the input path that would contain the file or directory based only on path information). If the provided path is relative, this checks all input paths for the existence of the file or directory and returns the first one where it exists.
Namespace
Statiq.Common
Containing Type
IReadOnlyFileSystemExtensions

Syntax

public static NormalizedPath GetContainingInputPath(this IReadOnlyFileSystem fileSystem, NormalizedPath path)

Parameters

Name Type Description
fileSystem IReadOnlyFileSystem The file system.
path NormalizedPath The file path.

Return Value

Type Description
NormalizedPath The input path that contains the specified file, or null if no input path does.