{
Session session = session(repoName, workspaceName(repoPath), null);
String uri =
uriInfo.getBaseUriBuilder().path(getClass()).path(repoName).path(workspaceName(repoPath)).build()
.toString();
Response prpfind = new PropFindCommand().propfind(session, destNodePath, body, depth.getIntValue(), uri);
if (prpfind.getStatus() != HTTPStatus.NOT_FOUND)
{
return Response.status(HTTPStatus.PRECON_FAILED)
.entity("Item exists on destination path, while overwriting is forbidden").build();
}