Class RenameStep
- Namespace
- ZeroInstall.Model
- Assembly
- ZeroInstall.Model.dll
Renames or moves a file or directory. It is an error if the source or destination are outside the implementation.
[Serializable]
[Equatable]
public sealed class RenameStep : FeedElement, IEquatable<XmlUnknown>, IEquatable<FeedElement>, IRecipeStep, ICloneable<IRecipeStep>, IEquatable<RenameStep>
- Inheritance
-
RenameStep
- Implements
- Inherited Members
Properties
Destination
The destination file or directory relative to the implementation root as a Unix-style path.
public required string Destination { get; set; }
Property Value
Source
The source file or directory relative to the implementation root as a Unix-style path.
public required string Source { get; set; }
Property Value
Methods
Clone()
Creates a deep copy of this RenameStep instance.
public IRecipeStep Clone()
Returns
- IRecipeStep
The new copy of the RenameStep.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Normalize(FeedUri?)
Converts legacy elements, sets default values, etc..
public void Normalize(FeedUri? feedUri = null)
Parameters
feedUriFeedUriThe feed the data was originally loaded from.
Exceptions
- UriFormatException
Href is relative and
feedUriis a remote URI.
ToString()
Returns the rename step in the form "Source => Destination". Not safe for parsing!
public override string ToString()
Returns
Operators
operator ==(RenameStep?, RenameStep?)
Indicates whether the object on the left is equal to the object on the right.
public static bool operator ==(RenameStep? left, RenameStep? right)
Parameters
leftRenameStepThe left object
rightRenameStepThe right object
Returns
- bool
true if the objects are equal; otherwise, false.
operator !=(RenameStep?, RenameStep?)
Indicates whether the object on the left is not equal to the object on the right.
public static bool operator !=(RenameStep? left, RenameStep? right)
Parameters
leftRenameStepThe left object
rightRenameStepThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.