in src/main/java/org/apache/sling/discovery/commons/providers/util/ResourceHelper.java [90:104]
public static void moveResource(Resource res, String path) throws PersistenceException {
Node node = res.adaptTo(Node.class);
if (node != null) {
try {
Session session = node.getSession();
session.move(res.getPath(), path);
}
catch (RepositoryException re) {
throw new PersistenceException("Move from " + res.getPath() + " to " + path + " failed.", re);
}
}
else {
moveResourceWithResourceAPI(res, path);
}
}