Removes {@link Permission}s from the specified {@code path}.
481181
private CompletableFuture<Revision> removePermissionAtPointer(Author author, String projectName,
                                                                  JsonPointer path, String commitSummary) {
        final Change<JsonNode> change = Change.ofJsonPatch(METADATA_JSON,
                                                           new RemoveOperation(path).toJsonNode());
        return metadataRepo.push(projectName, Project.REPO_DOGMA, author, commitSummary, change);
    }
1207772
public void deleteNode(String path) {

        try {

            zk.delete(path, -1);

        } catch (KeeperException.NoNodeException e) {

            LOGGER.error("cannot delete path: " + path, e);

        } catch (InterruptedException e) {

            LOGGER.warn(e.toString());

        } catch (KeeperException e) {

            LOGGER.error("cannot delete path: " + path, e);
        }
    }
631576
public static boolean deleteRecursive(File path) throws FileNotFoundException {
        if (!path.exists()) {
            throw new FileNotFoundException(path.getAbsolutePath());
        }

        boolean success = true;
        if (path.isDirectory()) {
            for (File f : path.listFiles()) {
                success = success && FileUtils.deleteRecursive(f);
            }
        }

        return success && path.delete();
    }
1200948
protected void removeIndexBackup(String path) {

        if (!isBackupReindexing()) {
            // if no backup is generated we don't need to do anything
            return;
        }

        // check if the target directory already exists
        File file = new File(path);
        if (!file.exists()) {
            // index does not exist yet
            return;
        }
        try {
            FSDirectory dir = FSDirectory.open(file.toPath());
            dir.close();
            CmsFileUtil.purgeDirectory(file);
        } catch (Exception e) {
            LOG.error(Messages.get().getBundle().key(Messages.LOG_IO_INDEX_BACKUP_REMOVE_2, getName(), path), e);
        }
    }
238167
private void removeEsDirectoryRecursively(final String path) throws Exception {
        logger.debug("Delete folder [{}]", path);
        Collection<String> listFile = getFileDirectory(path);

        for (String esfile : listFile) {
            esDelete(fsSettings.getElasticsearch().getIndex(), SignTool.sign(path.concat(File.separator).concat(esfile)));
        }

        Collection<String> listFolder = getFolderDirectory(path);
        for (String esfolder : listFolder) {
            removeEsDirectoryRecursively(esfolder);
        }

        esDelete(fsSettings.getElasticsearch().getIndexFolder(), SignTool.sign(path));
    }
627093
@Override
  public void deleteWithChildren(String path) throws InterruptedException, KeeperException
  {
    List<String> allChildren = findAllChildren(path);

    for(String child : allChildren)
    {
      delete(PathUtils.addPaths(path, child));
    }

    delete(path);
  }
254517
public static void removeEntry(File zip, String path, File destZip) {
    removeEntries(zip, new String[] { path }, destZip);
  }
897072
private void setRecursivePermission(Path path, OwnerAndPermission ownerAndPermission)
      throws IOException {
    List<FileStatus> files = FileListUtils.listPathsRecursively(this.fs, path, FileListUtils.NO_OP_PATH_FILTER);

    // Set permissions bottom up. Permissions are set to files first and then directories
    Collections.reverse(files);

    for (FileStatus file : files) {
      safeSetPathPermission(file.getPath(), addExecutePermissionsIfRequired(file, ownerAndPermission));
    }
  }
614257
int removePath(int path) {
		int prev = getPrevPath(path);
		int next = getNextPath(path);
		int geometry = getGeometryFromPath(path);
		if (prev != -1)
			setNextPath_(prev, next);
		else {
			setFirstPath_(geometry, next);
		}
		if (next != -1)
			setPrevPath_(next, prev);
		else {
			setLastPath_(geometry, prev);
		}

		clearPath(path);

		setGeometryPathCount_(geometry, getPathCount(geometry) - 1);
		freePath_(path);
		return next;
	}
634938
def remove(self, path):
        

        entry = self.find(path)

        if not entry:
            raise ValueError("%s does not exists" % path)

        if entry.type == 'root storage':
            raise ValueError("can no remove root entry")

        if entry.type == "storage" and not entry.child_id is None:
            raise ValueError("storage contains children")

        entry.pop()

        # remove stream data
        if entry.type == "stream":
            self.free_fat_chain(entry.sector_id, entry.byte_size < self.min_stream_max_size)

        self.free_dir_entry(entry)
269746
@Override
    protected void handlePermission(@NonNull File path) {
//         Should we show an explanation?
//        if (shouldShowRequestPermissionRationale(
//                Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
//             Explain to the user why we need permission
//        }

        mRequestedPath = path;
        requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
                PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE);
    }
1102417
def purge(path: str, pattern: str) -> None:
    
    for f in find(pattern, path):
        log.info("Deleting {}", f)
        os.remove(f)
444068
public boolean delete(Path path, boolean recursive) throws IOException {
      Path absolute = makeAbsolute(path);
      String srep = absolute.toUri().getPath();
      if (kfsImpl.isFile(srep))
        return kfsImpl.remove(srep) == 0;

      FileStatus[] dirEntries = listStatus(absolute);
      if ((!recursive) && (dirEntries != null) && 
            (dirEntries.length != 0)) {
        throw new IOException("Directory " + path.toString() + 
        " is not empty.");
      }
      if (dirEntries != null) {
        for (int i = 0; i < dirEntries.length; i++) {
          delete(new Path(absolute, dirEntries[i].getPath()), recursive);
        }
      }
      return kfsImpl.rmdir(srep) == 0;
    }
197270
public static String removeExtension(String path) throws IllegalArgumentException
  {
    Params.notNull(path, "Path");
    int extensionIndex = path.lastIndexOf('.');
    return extensionIndex != -1 ? path.substring(0, extensionIndex) : path;
  }
1044152
public static String removeTrailingSeparator(String path) {

        int l = path.length();
        if ((l <= 1) || (path.charAt(l - 1) != '/')) {
            return path;
        } else {
            return path.substring(0, l - 1);
        }
    }
1094893
public static void delete(String path, String acceptType, Route route) {
        getInstance().delete(path, acceptType, route);
    }
675979
public static String trimLastPathSection(String path) {
        String[] sections = path.split("/");
        StringBuilder newPath = new StringBuilder("/");
        for (int i = 1; i < sections.length - 1; i++) {
            newPath.append(sections[i]).append("/");
        }
        return newPath.toString();
    }