Table of Contents

Interface IPathMarker

Namespace
Invex.FileSystem
Assembly
Invex.FileSystem.dll

Defines a contract for types that represent a specific, well-known file path within the file system, resolved relative to the current System.IO.Abstractions.IFileSystem instance.

public interface IPathMarker

Remarks

Implement this interface (typically as a nested type or a source-generated partial class) to give a strongly-typed name to a path that would otherwise be identified by a magic string.

Unlike keys resolved through GetPath(string), IPathMarker paths are statically computed by the marker type itself via the Path(IFileSystem) static abstract method.

Methods

Path(IFileSystem)

Computes the rooted path that this marker represents, evaluated against the given fileSystem.

public static abstract RootedPath Path(IFileSystem fileSystem)

Parameters

fileSystem IFileSystem

The file system instance to bind the path to. Passing the current IRootedFileSystem keeps the returned RootedPath consistent with all other paths resolved by the application.

Returns

RootedPath

A RootedPath representing the location of the file or directory.