FilePath Class

Summary

Represents a file path.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.IO
Interfaces
Base Types
graph BT Type-->Base0["NormalizedPath"] click Base0 "/api/Wyam.Common.IO/NormalizedPath" Base0-->Base1["Object"] Type-.->Interface0["IComparable<NormalizedPath>"] Type-.->Interface1["IComparable"] Type-.->Interface2["IEquatable<NormalizedPath>"] Type["FilePath"] class Type type-node

Syntax

public sealed class FilePath : NormalizedPath, IComparable<NormalizedPath>, IComparable, 
    IEquatable<NormalizedPath>

Constructors

Name Summary
FilePath(string) Initializes a new instance of the Wyam.Common.IO.FilePath class. The path will be considered absolute if the underlying OS file system considers it absolute.
FilePath(string, PathKind) Initializes a new instance of the Wyam.Common.IO.FilePath class..
FilePath(string, string) Initializes a new instance of the Wyam.Common.IO.FilePath class with the specified file provider. The path will be considered absolute if the underlying OS file system considers it absolute.
FilePath(string, string, PathKind) Initializes a new instance of the Wyam.Common.IO.FilePath class with the specified file provider.
FilePath(Uri) Initializes a new instance of the Wyam.Common.IO.FilePath class with the specified file provider and/or path.
FilePath(Uri, string) Initializes a new instance of the Wyam.Common.IO.FilePath class with the specified file provider. The path will be considered absolute if the underlying OS file system considers it absolute.
FilePath(Uri, string, PathKind) Initializes a new instance of the Wyam.Common.IO.FilePath class with the specified file provider.

Fields

Name Constant Value Summary
DefaultFileProvider
The default file provider.
Inherited from NormalizedPath
static

Properties

Name Value Summary
Directory DirectoryPath
Gets the directory part of the path.
Extension string
Gets the file extension (including the preceding ".").
FileName FilePath
Gets the filename.
FileNameWithoutExtension FilePath
Gets the filename without it's extension.
FileProvider Uri
Gets the file provider for this path. If this is a relative path, the file provider will always be null. If this is an absolute path and the file provider is null it indicates the path is not intended for use with an actual file provider.
Inherited from NormalizedPath
FullPath string
Gets the full path.
Inherited from NormalizedPath
HasExtension bool
Gets a value indicating whether this path has a file extension.
IsAbsolute bool
Gets or sets a value indicating whether this path is absolute.
Inherited from NormalizedPath
IsRelative bool
Gets a value indicating whether this path is relative.
Inherited from NormalizedPath
Root DirectoryPath
Gets the root of this path or "." if this is a relative path or there is no root.
Inherited from NormalizedPath
RootRelative FilePath
Gets the file path relative to it's root path.
Segments string[]
Gets the segments making up the path.
Inherited from NormalizedPath

Methods

Name Value Summary
AppendExtension(string) FilePath
Appends a file extension to the path.
ChangeExtension(string) FilePath
Changes the file extension of the path.
Collapse() FilePath
Collapses a Wyam.Common.IO.FilePath containing ellipses.
CompareTo(NormalizedPath) int
Inherited from NormalizedPath
CompareTo(Object) int
Inherited from NormalizedPath
Equals(Object) bool
Inherited from NormalizedPath
FromString(string) FilePath
Performs a conversion from string to Wyam.Common.IO.FilePath.
static
FromUri(Uri) FilePath
Performs a conversion from System.Uri to Wyam.Common.IO.FilePath.
static
GetHashCode() int
Inherited from NormalizedPath
InsertPrefix(string) FilePath
Inserts a prefix into the file name.
InsertSuffix(string) FilePath
Inserts a suffix into the file name before the extension.
ToString() string
Returns a string that represents this path.
Inherited from NormalizedPath

Operators

Name Value Summary
implicit operator FilePath(string) FilePath
implicit operator FilePath(Uri) FilePath
GitHub