Check if the resource has a deleted mark
@param res the resource
@return true if the resource has been deleted; false otherwise
545474
public static Boolean isDeleted(final Resource res) {
        return LDP.Resource.equals(res.getInteractionModel()) && res.getTypes().contains(DeletedResource);
    }
1253119
private function isIdElsewhere(Resource $res): bool {
        $revMatches = $this->reversePropertyUris($res);
        foreach ($revMatches as $prop) {
            if ($prop != RC::idProp()) {
                continue;
            }
            $matches = $this->resourcesMatching($prop, $res);
            foreach ($matches as $i) {
                if ($i->getUri() != $res->getUri()) {
                    return true;
                }
            }
        }
        return false;
    }
762142
public static <R extends JCGLResourceUsableType> R checkNotDeleted(
    final R r)
    throws JCGLExceptionDeleted
  {
    NullCheck.notNull(r, "Resource");

    if (r.isDeleted()) {
      throw new JCGLExceptionDeleted(
        String.format(
          "Cannot perform operation: OpenGL object %s has been deleted.", r));
    }

    return r;
  }
197995
public static boolean isDelete(final WebContext context) {
        return HttpConstants.HTTP_METHOD.DELETE.name().equalsIgnoreCase(context.getRequestMethod());
    }
106109
public void checkCanceled(final ResourceSet rs) {
    if ((rs instanceof XtextResourceSet)) {
      if ((((XtextResourceSet)rs).isOutdated() && (this.cancelationAllowed.get()).booleanValue())) {
        this.canceledManager.throwOperationCanceledException();
      }
    }
  }
453827
private boolean isNoInheritanceMarker(int res) {
        int offset = RES_GET_OFFSET(res);
        if (offset == 0) {
            // empty string
        } else if (res == offset) {
            offset = getResourceByteOffset(offset);
            return getInt(offset) == 3 && bytes.getChar(offset + 4) == 0x2205 &&
                    bytes.getChar(offset + 6) == 0x2205 && bytes.getChar(offset + 8) == 0x2205;
        } else if (RES_GET_TYPE(res) == ICUResourceBundle.STRING_V2) {
            if (offset < poolStringIndexLimit) {
                return poolBundleReader.isStringV2NoInheritanceMarker(offset);
            } else {
                return isStringV2NoInheritanceMarker(offset - poolStringIndexLimit);
            }
        }
        return false;
    }
339750
@Override
    public boolean isToBeDeleted()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(
                        tc,
                        "isToBeDeleted",
                        new Object[] { getName(), getUuid().toString() });
            SibTr.exit(tc, "isToBeDeleted", Boolean.valueOf(_toBeDeleted));
        }

        return _toBeDeleted;
    }
836158
public boolean isRequestComplete() {
        PooledByteBuffer[] data = getAttachment(BUFFERED_REQUEST_DATA);
        if(data != null) {
            return false;
        }
        return allAreSet(state, FLAG_REQUEST_TERMINATED);
    }
1190708
private boolean isResetOp(int seen) {
        return resetOps.get(seen) || OpcodeUtils.isStore(seen) || OpcodeUtils.isReturn(seen)
                || ((OpcodeUtils.isInvoke(seen) && getSigConstantOperand().endsWith(")V")) || (isBranch(seen) && (getBranchOffset() < 0)));
    }
733423
public ResponseBuilder deleteResource(final Resource res) {
        final String baseUrl = getBaseUrl();
        final String identifier = baseUrl + req.getPartition() + req.getPath();

        final Session session = ofNullable(req.getSession()).orElseGet(HttpSession::new);

        // Check if this is already deleted
        checkDeleted(res, identifier);

        // Check the cache
        final EntityTag etag = new EntityTag(md5Hex(res.getModified() + identifier));
        checkCache(req.getRequest(), res.getModified(), etag);

        LOGGER.debug("Deleting {}", identifier);

        try (final TrellisDataset dataset = TrellisDataset.createDataset()) {

            // Add the audit quads
            audit.ifPresent(svc -> svc.deletion(res.getIdentifier(), session).stream()
                    .map(skolemizeQuads(resourceService, baseUrl)).forEachOrdered(dataset::add));

            // When deleting just the ACL graph, keep the user managed triples in tact
            if (ACL.equals(req.getExt())) {
                try (final Stream<? extends Triple> triples = res.stream(PreferUserManaged)) {
                    triples.map(t -> rdf.createQuad(PreferUserManaged, t.getSubject(), t.getPredicate(), t.getObject()))
                        .forEachOrdered(dataset::add);
                }
            }

            // delete the resource
            if (resourceService.put(res.getIdentifier(), dataset.asDataset())) {
                return status(NO_CONTENT);
            }
        }

        LOGGER.error("Unable to delete resource at {}", res.getIdentifier());
        return serverError().entity("Unable to delete resource. Please consult the logs for more information");
    }
643964
private boolean isRed(IntervalRBTreeNode<T> n) {
    if (n == null) {
      return false;
    }
    return n.color == IntervalRBTreeNode.RED;
  }
801848
public static Specification<JpaDistributionSetType> isDeleted(final Boolean isDeleted) {
        return (targetRoot, query, cb) -> cb.equal(targetRoot.<Boolean> get(JpaDistributionSetType_.deleted),
                isDeleted);
    }
879572
public boolean wasDeleted(@NonNull T object) {
        final DeleteResult result = results.get(object);
        return result != null && result.numberOfRowsDeleted() > 0;
    }
774099
public boolean delete() {
        boolean deleted = false;
        for (File child : file.listFiles()) {
            deleted = child.delete() || deleted;
        }
        deleted = file.delete() || deleted;
        return deleted;
    }
275533
public static boolean deleteDir(File dir) {        
        if (dir.isDirectory()) {
            String[] children = dir.list();
            for (String file : children) {
                boolean success = deleteDir(new File(dir, file));
                if (!success) {
                    return false;
                }
            }
        }

        // The directory is now empty so delete it
        return dir.delete();
    }
1270923
@InterfaceAudience.Public
    public boolean isDeletion() {
        Object deleted = getProperty("_deleted");
        if (deleted == null) {
            return false;
        }
        Boolean deletedBool = (Boolean) deleted;
        return deletedBool.booleanValue();
    }
1277148
private boolean willObjectBeDeletedLocked(String id) {
    if (!this.items.containsKey(id)) {
      return false;
    }
    Deque<MutablePair<DeltaType, Object>> deltas = this.items.get(id);
    return !(Collections.isEmptyCollection(deltas))
        && deltas.peekLast().getLeft().equals(DeltaType.Deleted);
  }