Delete all items
496931
function() {
        var self = this;
        return Q.ninvoke(fs, 'readdir', path.join(this.backend.options.path, this.name))
            .then(function(files) {
                return Q.all(files.map(function(f) {
                    return self.delete(f);
                }));
            })
            .then(function() {
                return true;
            });
    }
516219
def clear():
    
    utils.check_for_local_server()
    click.confirm(
        "Are you sure you want to do this? It will delete all of your data",
        abort=True
    )
    server = Server(config["local_server"]["url"])
    for db_name in all_dbs:
        del server[db_name]
350297
protected function cleanup()
	{
		$items = $this->getParent(false)->listContents();

		foreach ($items as $item)
		{
			if (in_array($item->getName(), ['.svn', 'CVS', '.DS_Store', '__MACOSX']))
			{
				if (!$item->delete())
				{
					return false;
				}
			}
		}

		return true;
	}
682625
def delete(self, item, dry_run=None):
        """"""
        logger.debug('Deleting item. Item: {item} Table: {namespace}'.format(
            item=item,
            namespace=self.namespace
        ))

        if not dry_run:
            self.table.delete_item(Key={'id': item['id']})

        return item
787335
def removeItem(self, item):
        """"""
        try:
            self.tree.removeItem(item)
        except AttributeError, e:
            raise VersionError('Saved versions are immutable')
1176965
def remove_item(self, item):
        
        for idx, _item in enumerate(self.items):
            if item == _item:
                del self.items[idx]
                return True
        return False
371031
def delete_item(name)
      previous = items.size
      items.reject! { |item| item.name == name}
      previous != items.size
    end
434374
def cleanup(self):
        
        empty_keys = [k for k, v in self.items() if not v]

        for k in empty_keys:
            del self[k]
1316197
def delete(v)
      return unless include? v
      raise ArgumentError, "Item is protected and cannot be deleted" if protected? index(v)
      @list.delete v
    end
94421
protected function deleteCollectionItem()
    {
        $this->controlAccess('collection_item_delete');

        if ($this->collection_item->delete($this->data_collection_item['collection_item_id'])) {
            $url = "admin/content/collection-item/{$this->data_collection['collection_id']}";
            $this->redirect($url, $this->text('Collection item has been deleted'), 'success');
        }

        $this->redirect('', $this->text('Collection item has not been deleted'), 'warning');
    }
1268256
def clean(self):
        
        for key, value in self.values.copy().items():
            if value is None:
                del self.values[key]
1178379
def clear(self):
        """"""

        r = self._h._http_resource(
            method='DELETE',
            resource=('user', 'keys'),
        )

        return r.ok
1192507
def clear(self):
        """"""
        self._len = 0
        del self._maxes[:]
        del self._lists[:]
        del self._keys[:]
        del self._index[:]
906554
def delete(self, item, dry_run=None):
        """"""
        return self.backend.delete(item, dry_run=dry_run)
1036805
def delete_all(config=None):
    
    storm_ = get_storm_instance(config)

    try:
        storm_.delete_all_entries()
        print(get_formatted_message('all entries deleted.', 'success'))
    except Exception as error:
        print(get_formatted_message(str(error), 'error'), file=sys.stderr)
        sys.exit(1)
828564
def clear(self):
        """"""
        with self.lock:
            self.data.clear()
            self.items.clear()
784966
def delete(key)
      c = @items[key]
      if c
        @items.delete(key)
        @list.each_index do |i|
  	      if @list[i] == key
  	        @list.delete_at(i)
  	        break
  	      end
        end
        c
      end
    end