Record Class DirectoryCopy.CopyOutcome
java.lang.Object
java.lang.Record
org.ek9lang.core.DirectoryCopy.CopyOutcome
- Enclosing class:
DirectoryCopy
public static record DirectoryCopy.CopyOutcome(boolean success, List<CopiedFile> files, Optional<String> refusedEntry)
extends Record
The outcome of a copy: it succeeded, with the hash of every file copied; or a symbolic link refused it
(
refusedEntry names its path, relative to the source); or it failed for another reason
(refusedEntry says why). Never partial: a failure leaves destination exactly as it was
before the call.-
Constructor Summary
ConstructorsConstructorDescriptionCopyOutcome(boolean success, List<CopiedFile> files, Optional<String> refusedEntry) Creates an instance of aCopyOutcomerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.files()Returns the value of thefilesrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of therefusedEntryrecord component.booleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CopyOutcome
Creates an instance of aCopyOutcomerecord class.- Parameters:
success- the value for thesuccessrecord componentfiles- the value for thefilesrecord componentrefusedEntry- the value for therefusedEntryrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
files
Returns the value of thefilesrecord component.- Returns:
- the value of the
filesrecord component
-
refusedEntry
-