// AddDir - Rename public TranspResult transp(AddDir c1, Rename c2) { if (c1.getPath().equals(c2.getPath())) { // Rename the AddDir and Delete the Rename c1.setPath(c2.getNewPath()); return new TranspResult(c1, new EmptyOp(c2), false); } if (childOf(c1, c2)) { // rename the parent path concerned by the rename c1.setPath(replacePath(c1.getPath(), c2.getNewPath())); return new TranspResult(c2, c1, true); } return new TranspResult(c2, c1, true); }