Package com.deltawalker.script
Interface DeltaNode
- All Superinterfaces:
Delta
A node in the results of a
FolderComparison: one file or folder,
with the Resource found at each Role and the result of
comparing them.
const nodes = comp.getAllDeltas();
for (let i = 0; i < nodes.length; i++) {
const inRef = nodes[i].resource(Role.REF);
const inOne = nodes[i].resource(Role.ONE);
if (inRef && !inOne) {
console.log('Only in Role.REF: ' + inRef.getPath());
}
}
- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.deltawalker.script.Delta
Delta.Kind -
Method Summary
Modifier and TypeMethodDescriptionReturns details about the differences between the resources of the specified relation, such as the comparison methods that found them.Methods inherited from interface com.deltawalker.script.Delta
getChildren, getParent, hasChildren, isAdded, isChanged, isConflict, isDeleted, isOverallKind, isPseudoConflict, isSame, kind
-
Method Details
-
detail
Returns details about the differences between the resources of the specified relation, such as the comparison methods that found them.- Parameters:
relation- the two roles of the relation of interest, for example[Role.REF, Role.ONE]; cannot benull- Returns:
- the details, or
nullif none are available - Throws:
NullPointerException- ifrelationisnullIllegalArgumentException- ifrelationis not a valid pair of roles- Since:
- 2.0
-
resource
- Parameters:
role- a role of this comparison; cannot benull- Returns:
- the resource at the specified role, or
nullif the file or folder does not exist at that role - Throws:
NullPointerException- ifroleisnullIllegalArgumentException- ifroleis invalid for this node, for instanceRole.TWOfor a node that represents a 2-way comparison.- Since:
- 2.0
-