An internal method to remove a directory from the Joliet portion of the ISO.

        Parameters:
         joliet_path - The Joliet directory to remove.
        Returns:
         The number of bytes to remove from the ISO for this Joliet directory.
501473
def _rm_joliet_dir(self, joliet_path):
        # type: (bytes) -> int
        '''
        
        '''
        if self.joliet_vd is None:
            raise pycdlibexception.PyCdlibInternalError('Tried to remove joliet dir from non-Joliet ISO')

        log_block_size = self.joliet_vd.logical_block_size()
        joliet_child = self._find_joliet_record(joliet_path)
        num_bytes_to_remove = joliet_child.get_data_length()
        num_bytes_to_remove += self._remove_child_from_dr(joliet_child,
                                                          joliet_child.index_in_parent,
                                                          log_block_size)
        if joliet_child.ptr is None:
            raise pycdlibexception.PyCdlibInternalError('Joliet directory has no path table record; this should not be')
        if self.joliet_vd.remove_from_ptr_size(path_table_record.PathTableRecord.record_length(joliet_child.ptr.len_di)):
            num_bytes_to_remove += 4 * log_block_size

        return num_bytes_to_remove
725857
def delete_file(self, path):
        
        self.log.debug("S3contents.GenericManager: delete_file '%s'", path)
        if self.file_exists(path) or self.dir_exists(path):
            self.fs.rm(path)
        else:
            self.no_such_entity(path)
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;
    }
1204837
def delete_resource(self, resource_path):
        
        res = self.execute_operation(method="DELETE", ops_path=resource_path)
        logging.info("Deleted resource %s" %(resource_path))
        return res
558340
def _delete_file(configurator, path):
    
    path = os.path.join(configurator.target_directory, path)
    os.remove(path)
    try:
        os.removedirs(os.path.dirname(path))
    except OSError:
        pass
233846
public static Path deleteOnExit(Path path) {
        debug(log, "deleteOnExit", path);
        path.toFile().deleteOnExit();
        return path;
    }
997682
def _robust_remove(path):
        
        tries = itertools.count()
        max_tries = 50
        while os.path.isdir(path):
            try:
                shutil.rmtree(path)
            except WindowsError:
                if next(tries) >= max_tries:
                    raise
                time.sleep(0.2)
1041653
def delete_symlink(path)
      if Origen.running_on_windows?
        # Don't use regular rm on windows symlink, will delete into the remote dir!
        system("call cmd /c rmdir #{path.to_s.gsub('/', '\\')}")
        FileUtils.rm_f("#{path}_is_a_symlink")
      else
        FileUtils.rm_f(path)
      end
    end
636659
def delete(path)
      uri = URI.join(API_DOMAIN, path + "?access_token=#{token}")

      req = Net::HTTP::Delete.new(uri)
      res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |https|
        https.request(req)
      end
      JSON.parse(res.body)
    end
771640
def _remove_tmp_path(self, tmp_path):
        
        LOG.debug('_remove_tmp_path(%r)', tmp_path)
        if tmp_path is None and ansible.__version__ > '2.6':
            tmp_path = self._connection._shell.tmpdir  # 06f73ad578d
        if tmp_path is not None:
            self._connection.get_chain().call_no_reply(
                ansible_mitogen.target.prune_tree,
                tmp_path,
            )
        self._connection._shell.tmpdir = None
1122888
def unregister_path(self, path):
        

        if not path in self:
            raise umbra.exceptions.PathExistsError("{0} | '{1}' path isn't registered!".format(
                self.__class__.__name__, path))

        del (self.__paths[path])
        return True
218299
def remove(path):
    

    try:
        if os.path.isfile(path):
            LOGGER.debug("> Removing '{0}' file.".format(path))
            os.remove(path)
        elif os.path.isdir(path):
            LOGGER.debug("> Removing '{0}' directory.".format(path))
            shutil.rmtree(path)
        return True
    except Exception as error:
        raise foundations.exceptions.PathRemoveError(
            "!> {0} | Cannot remove '{1}' path: '{2}'".format(__name__, path, error))
1204741
public UnixPath removeTrailingSeparator() {
    if (!isRoot() && hasTrailingSeparator()) {
      return new UnixPath(permitEmptyComponents, path.substring(0, path.length() - 1));
    } else {
      return this;
    }
  }
782762
public static boolean deleteDir(Path targetDirPath) {
        debug(log, "deleteDir", targetDirPath);
        return deleteBulkThenFalseList(
                JMCollections.getReversed(JMPath.getSubPathList(targetDirPath)))
                .size() == 0 && delete(targetDirPath);
    }
1233648
def remove_tree_by_path(self, path):
        
        with transaction.manager:
            trees = self.path_db.get(path, None)

        if not trees:
            return

        for tree in trees:
            return self._remove_tree(tree)
1136970
def remove_path(path):
    """"""
    if path is None or not os.path.exists(path):
        return
    if platform.system() == 'Windows':
        # Need to have write permission before deleting the file.
        os.chmod(path, stat.S_IWRITE)
    try:
        if os.path.isdir(path):
            shutil.rmtree(path)
        elif os.path.isfile(path):
            shutil.os.remove(path)
    except OSError:
        logger.exception("Could not remove path: %s" % path)
1224048
def delete_file(path)
      Jekyll.logger.debug "DELETING:", path
      FileUtils.rm_f sanitized_path(path)
      site.process
    end