This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

FilePath Pennington.Routing

A file system path value used for content source and output locations.

Properties

Extension string
The file extension including the leading dot, or empty if none.
FileName string
The file name with extension.
FileNameWithoutExtension string
The file name without its extension.
Value string
Underlying path string.

Constructors

FilePath

#
public FilePath(string Value)

A file system path value used for content source and output locations.

Parameters

Value string
Underlying path string.

Methods

ResolveAgainstRoot

#
public static string ResolveAgainstRoot(string path, string root)

Resolves path against root: returns it unchanged when it is already rooted or when root is null or empty, otherwise combines the two.

Parameters

path string
A path that may be absolute or relative to root.
root string
The base directory used to resolve a relative path.

Returns

string

ToString

#
public string ToString()

Returns the underlying path string.

Returns

string

Pennington.Routing.FilePath

namespace Pennington.Routing;

/// A file system path value used for content source and output locations.
public struct FilePath
{
    /// The file extension including the leading dot, or empty if none.
    
public string Extension { get; }
/// The file name with extension.
public string FileName { get; }
/// The file name without its extension.
public string FileNameWithoutExtension { get; }
/// A file system path value used for content source and output locations.
public FilePath(string Value)
; /// Resolves path against root: returns it unchanged when it is already rooted or when root is null or empty, otherwise combines the two.
public static string ResolveAgainstRoot(string path, string root)
; /// Returns the underlying path string.
public string ToString()
; /// Underlying path string.
public string Value { get; set; }
}