FilePath Pennington.Routing
A file system path value used for content source and output locations.
Properties
Extensionstring- The file extension including the leading dot, or empty if none.
FileNamestring- The file name with extension.
FileNameWithoutExtensionstring- The file name without its extension.
Valuestring- Underlying path string.
Constructors
FilePath
#public FilePath(string Value)
A file system path value used for content source and output locations.
Parameters
Valuestring- 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
pathstring- A path that may be absolute or relative to
root. rootstring- The base directory used to resolve a relative
path.
Returns
stringToString
#public string ToString()
Returns the underlying path string.
Returns
stringPennington.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; }
}