FilePath Class

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.

Definition

Namespace: HtmlToMamlConversion
Assembly: ConvertHtmlToMaml (in ConvertHtmlToMaml.exe) Version: 2022.3.11.0
[SerializableAttribute]
public class FilePath : ICloneable
Inheritance
Object    FilePath
Derived
Implements
ICloneable

Constructors

FilePath(IBasePathProvider) Default constructor. The file path is undefined.
FilePath(String, IBasePathProvider) Constructor. Assign the specified path.
FilePath(String, Boolean, IBasePathProvider) Constructor. Assign the specified path and fixed setting.

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 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 This is overridden to allow proper comparison of file path objects.
(Overrides ObjectEquals(Object))
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetFullPath 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
(Overrides ObjectGetHashCode)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OnPersistablePathChanged This raises the PersistablePathChanged event
OnPersistablePathChanging This raises the PersistablePathChanging event
RelativeToAbsolutePath 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
(Overrides ObjectToString)

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

Equality(FilePath, FilePath) Overload for equal operator.
(FilePath to String) This is used to handle an implicit conversion from a FilePath object to a string
Inequality(FilePath, FilePath) Overload for not equal operator.

See Also