()
| 25 | } |
| 26 | |
| 27 | @Override |
| 28 | protected boolean run() { |
| 29 | final Data data = context.data(); |
| 30 | final String path = MetaData.normPath(args[0]); |
| 31 | if(path == null) return error(PATH_INVALID_X, args[0]); |
| 32 | |
| 33 | final IntList docs = data.resources.docs(path); |
| 34 | return update(data, () -> { |
| 35 | // delete XML documents |
| 36 | final AtomicUpdateCache auc = new AtomicUpdateCache(data); |
| 37 | for(final int pre : docs.toArray()) auc.addDelete(pre); |
| 38 | auc.execute(false); |
| 39 | // delete binaries |
| 40 | int size = docs.size(); |
| 41 | for(final ResourceType type : Resources.BINARIES) { |
| 42 | size += binaries(data, path, type); |
| 43 | } |
| 44 | return info(RES_DELETED_X_X, size, jc().performance); |
| 45 | }); |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Deletes binary resources. |
nothing calls this directly
no test coverage detected