Delete all boolean.

@param targetPath the target path
@return the boolean
519405
public static boolean deleteAll(Path targetPath) {
        debug(log, "deleteAll", targetPath);
        return JMPath.isDirectory(targetPath) ? deleteDir(targetPath)
                : delete(targetPath);
    }
274380
void clearPath(int path) {
		int first_vertex = getFirstVertex(path);
		if (first_vertex != -1) {
			// TODO: can ve do this in one shot?
			int vertex = first_vertex;
			for (int i = 0, n = getPathSize(path); i < n; i++) {
				int v = vertex;
				vertex = getNextVertex(vertex);
				freeVertex_(v);
			}
			int geometry = getGeometryFromPath(path);
			setGeometryVertexCount_(geometry, getPointCount(geometry)
					- getPathSize(path));
		}
		setPathSize_(path, 0);
	}
434910
public static boolean createNewFile(File targetFile) {
        if (targetFile.exists()) delFileOrFolder(targetFile);
        try {
            return targetFile.createNewFile();
        } catch (IOException e) {
            return false;
        }
    }
1152117
public static void delete(String path) throws IOException {
    if (!Files.deleteIfExists(Paths.get(path))) {
      throw new IOException("Failed to delete " + path);
    }
  }
1002528
public void delete(final String path, int version, VoidCallback cb,
            Object ctx) {
        verbotenThreadCheck();
        final String clientPath = path;
        PathUtils.validatePath(clientPath);

        final String serverPath;

        // maintain semantics even in chroot case
        // specifically - root cannot be deleted
        // I think this makes sense even in chroot case.
        if (clientPath.equals("/")) {
            // a bit of a hack, but delete(/) will never succeed and ensures
            // that the same semantics are maintained
            serverPath = clientPath;
        } else {
            serverPath = prependChroot(clientPath);
        }

        RequestHeader h = new RequestHeader();
        h.setType(ZooDefs.OpCode.delete);
        DeleteRequest request = new DeleteRequest();
        request.setPath(serverPath);
        request.setVersion(version);
        cnxn.queuePacket(h, new ReplyHeader(), request, null, cb, clientPath,
                serverPath, ctx, null);
    }
305507
private boolean delete(final File f) throws IOException {

		if (f.isDirectory()) {

			final File[] files = f.listFiles();
			for (int i = 0; i < files.length; i++) {
				final boolean del = delete(files[i]);
				if (del == false) {
					return false;
				}
			}

		} else {
			return f.delete();
		}

		// Now directory is empty
		return f.delete();
	}
621551
public <T> AsyncMutateInBuilder remove(String path) {
        if (StringUtil.isNullOrEmpty(path)) {
            throw new IllegalArgumentException("Path must not be empty for remove");
        }
        this.mutationSpecs.add(new MutationSpec(Mutation.DELETE, path, null));
        return this;
    }
127793
public List<String> selectJars(String targetPath) {
        List<String> jarPaths = new ArrayList<String>();

        if (targetPath == null) {
            return jarPaths;
        }

        File targetDir = new File(targetPath);
        if (!UtilImpl_FileUtils.exists(targetDir)) {
            return jarPaths;
        }

        File[] targetFiles = UtilImpl_FileUtils.listFiles(targetDir);
        if (targetFiles != null) {
            for (File nextTargetFile : targetFiles) {
                String nextTargetName = nextTargetFile.getName();
                if (nextTargetName.toUpperCase().endsWith(".JAR")) {
                    String nextTargetPath = targetPath + "/" + nextTargetName;
                    jarPaths.add(nextTargetPath);
                }
            }
        }

        return jarPaths;
    }
636516
public static boolean excludePath(String path) {
        String[] excludePatterns = SiteProperties.getExcludePatterns();
        if (ArrayUtils.isNotEmpty(excludePatterns)) {
            return RegexUtils.matchesAny(path, excludePatterns);
        } else {
            return false;
        }
    }
848138
def delete(self, path, recursive=False):
        
        _log.debug("ZK: Deleting node " + path)
        return self.zk.delete(path, recursive=recursive)
325276
public void deleteInternal(String filePath, boolean recursive) {
        //Process and validate path
        final String processedPath = processAndValidateFilePath(filePath, false);

        boolean deleted;
        if (recursive) {
            File fileToDelete = new File(processedPath);
            if (FileUtils.fileIsDirectory(fileToDelete)) {
                recursiveDelete(fileToDelete);
            } else {
                FileUtils.fileDelete(fileToDelete);
            }
            deleted = FileUtils.fileExists(fileToDelete) == false;
        } else {
            deleted = deleteLocalFile(processedPath);
        }

        if (!deleted) {
            IOException ioe = new IOException(TraceNLS.getFormattedMessage(this.getClass(),
                                                                           APIConstants.TRACE_BUNDLE_FILE_TRANSFER,
                                                                           "DELETE_REQUEST_ERROR",
                                                                           null,
                                                                           "CWWKX0126E: Delete request for file " + processedPath + " could not be completed."));
            throw ErrorHelper.createRESTHandlerJsonException(ioe, null, APIConstants.STATUS_BAD_REQUEST);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isInfoEnabled()) {
            Tr.info(tc, "DELETE_REQUEST_COMPLETE_INFO", processedPath);
        }
    }
621923
private boolean filter(final String classpathElementPath) {
        if (scanSpec.classpathElementFilters != null) {
            for (final ClasspathElementFilter filter : scanSpec.classpathElementFilters) {
                if (!filter.includeClasspathElement(classpathElementPath)) {
                    return false;
                }
            }
        }
        return true;
    }
835131
@DELETE
    @Path("{ids}")
    public final Response deleteMultiple(@NotNull @PathParam("ids") URI_ID id,
                                         @NotNull @PathParam("ids") final PathSegment ids,
                                         @QueryParam("permanent") final boolean permanent) throws Exception {
        return super.deleteMultiple(id, ids, permanent);
    }
425616
def remove(self, path, recursive=True, skip_trash=True):
        
        if recursive:
            to_delete = []
            for s in self.get_all_data().keys():
                if s.startswith(path):
                    to_delete.append(s)
            for s in to_delete:
                self.get_all_data().pop(s)
        else:
            self.get_all_data().pop(path)
32418
public static void delete(@NotNull String path, @NotNull Handler handler) {
        staticInstance().delete(prefixPath(path), handler);
    }
236046
static void deletePath(String path) {
        try {
            ZkConnection.client.delete().guaranteed().deletingChildrenIfNeeded().forPath(path);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
329848
public static boolean createFile(File targetFile) {
        if (targetFile.exists()) {
            if (targetFile.isFile()) return true;
            delFileOrFolder(targetFile);
        }
        try {
            return targetFile.createNewFile();
        } catch (IOException e) {
            return false;
        }
    }