if (!oldPath.equals(newPath)
&& Validations.isEmpty(Nodes.getByPath(newPath).getParents(
Trash.class))) {
final String target = "./~" + oldPath;
final String replacement = "./~" + newPath;
Database.write(new Command() {
public void run() {
for (Content content : searchContent(target)) {
content.replace(target, replacement);
Database.save(content);
}