Table of Contents

FilePath Class

Definition

Namespace
Sandcastle.Core
Assembly
Sandcastle.Core.dll

This class is used to represent a file path. Support is included for treating the path as fixed or relative and for expanding environment variables in the path name.

[Serializable]
[TypeConverter(typeof(FilePathTypeConverter))]
public class FilePath : ICloneable
Inheritance
FilePath
Implements
Derived

Constructors

FilePath(IBasePathProvider)

Default constructor. The file path is undefined.

FilePath(string, bool, IBasePathProvider)

Constructor. Assign the specified path and fixed setting.

FilePath(string, IBasePathProvider)

Constructor. Assign the specified path.

Fields

DefaultOutDir

This defines the default OutDir MSBuild property value (.)

PathAndWildcards

This defines the common path and wildcard characters

RelativePathPrefix

This defines the relative path prefix

Wildcards

This defines the common wildcard characters

Properties

BasePath

This returns the base path for the object

BasePathProvider

This is used to get the base path provider for the object.

Exists

This read-only property can be used to determine whether or not the file path exists

ExpandedPath

This read-only property is used to display the fully qualified path with environment variable expansions in the designer.

IsFixedPath

This is used to indicate whether or not the path will be treated as a relative or fixed path when converted retrieved via the PersistablePath property.

Path

This is used to get or set the path to use.

PersistablePath

This is used to retrieve the file path in a format suitable for persisting to storage based on the current settings.

Methods

AbsoluteToRelativePath(string, string)

This helper method can be used to convert an absolute path to one that is relative to the given base path.

Clone()

This returns a clone of the object

Equals(object)

This is overridden to allow proper comparison of file path objects.

GetFullPath(string)

This returns the fully qualified path for the specified path. This version allows wildcards in the filename part if present.

GetHashCode()

Get a hash code for the file path object

OnPersistablePathChanged(EventArgs)

This raises the PersistablePathChanged event

OnPersistablePathChanging(EventArgs)

This raises the PersistablePathChanging event

RelativeToAbsolutePath(string, string)

This helper method can be used to convert a relative path to an absolute path based on the given base path.

ToString()

Convert the file path to a string

Events

PersistablePathChanged

This event is raised when the persistable path changes

PersistablePathChanging

This event is raised when the persistable path is about to be changed

Operators

implicit operator string(FilePath)

This is used to handle an implicit conversion from a FilePath object to a string

operator !=(FilePath, FilePath)

Overload for not equal operator.

operator ==(FilePath, FilePath)

Overload for equal operator.