Table of Contents

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

string

Source

The source file or directory relative to the implementation root as a Unix-style path.

public required string Source { get; set; }

Property Value

string

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

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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

feedUri FeedUri

The feed the data was originally loaded from.

Exceptions

UriFormatException

Href is relative and feedUri is a remote URI.

ToString()

Returns the rename step in the form "Source => Destination". Not safe for parsing!

public override string ToString()

Returns

string

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

left RenameStep

The left object

right RenameStep

The 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

left RenameStep

The left object

right RenameStep

The right object

Returns

bool

true if the objects are not equal; otherwise, false.