Delete file or folder

        uri -- mediafire URI

        Keyword arguments:
        purge -- delete the resource without sending it to Trash.
546431
def delete_resource(self, uri, purge=False):
        
        try:
            resource = self.get_resource_by_uri(uri)
        except ResourceNotFoundError:
            # Nothing to remove
            return None

        if isinstance(resource, File):
            result = self.delete_file(uri, purge)
        elif isinstance(resource, Folder):
            result = self.delete_folder(uri, purge)
        else:
            raise ValueError('Unsupported resource: {}'.format(type(resource)))

        return result
351209
public DeleteMediaResourceResponse deleteMediaResource(String mediaId) {
        DeleteMediaResourceRequest request = new DeleteMediaResourceRequest().withMediaId(mediaId);
        return deleteMediaResource(request);
    }
755820
def purge_all(delete=False, verbosity=0):
    """"""
    _location_purge_all(delete, verbosity)
    _storage_purge_all(delete, verbosity)
1079992
def _remove_media(self,directory,files=None):
        """"""
        # Connect if we aren't already
        if not self._connectToFlickr():
            logger.error("%s - Couldn't connect to flickr")
            return False

        db=self._loadDB(directory)
        # If no files given, use files from DB in dir
        if not files:
            files=db.keys()

        #If only one file given, make it a list
        if isinstance(files,basestring):
            files=[files]

        for fn in files:
            print("%s - Deleting from flickr [local copy intact]"%(fn))

            try:
                pid=db[fn]['photoid']
            except:
                logger.debug("%s - Was never in flickr DB"%(fn))
                continue
            resp=self.flickr.photos_delete(photo_id=pid,format='etree')
            if resp.attrib['stat']!='ok':
                print("%s - flickr: delete failed with status: %s",\
                        resp.attrib['stat']);
                return False
            else:
                logger.debug('Removing %s from flickr DB'%(fn))
                del db[fn]
                self._saveDB(directory,db)

        return True
607835
def purge_files(self, exclude_files=["index.html", "error.html"]):
        
        for chunk in utils.chunk_list(self._get_manifest_data(), 1000):
            try:
                self.s3.delete_objects(
                    Bucket=self.sitename,
                    Delete={
                        'Objects': [{"Key": f} for f in chunk
                                    if f not in exclude_files]
                    }
                )
            except Exception as ex:
                pass
175878
def	purge_url(self, host, path):
		""""""
		content = self._fetch(path, method="PURGE", headers={ "Host": host }) 
		return FastlyPurge(self, content)
256497
def remove(self, force=False):
        
        if force:
            _fs, filename = opener.parse(self.uri)
            _fs.remove(filename)
        self.uri = None
931807
def purge(root=os.path.join(base.data_dir(), 'models')):
    
    """
    root = os.path.expanduser(root)
    files = os.listdir(root)
    for f in files:
        if f.endswith(".params"):
            os.remove(os.path.join(root, f))
783587
def file_delete(context, id, file_id):
    
    component.file_delete(context, id=id, file_id=file_id)
203222
def delete(self, resource, resource_id):
        '''
        
        '''

        service_def, resource_def, path = self._get_service_information(
            resource)
        delete_path = "{0}{1}/" . format(path, resource_id)
        return self.call(path=delete_path, method="delete")
581065
def delete(callback=None, path=None, method=Method.DELETE, tags=None, summary="Delete specified resource.",
           middleware=None):
    # type: (Callable, Path, Methods, Tags, str, List[Any]) -> Operation
    
    def inner(c):
        op = Operation(c, path or PathParam('{key_field}'), method, None, tags, summary, middleware)
        op.responses.add(Response(HTTPStatus.NO_CONTENT, "{name} has been deleted.", None))
        op.responses.add(Response(HTTPStatus.NOT_FOUND, "Not found", Error))
        return op
    return inner(callback) if callback else inner
567332
def purge(self, ignore_ignores):
        """"""
        command = ['sync', '#none']
        if ignore_ignores:
            command.append('--no-ignore')
        d = self._dovccmd(command, collectStdout=True)

        # add deferred to rm tree

        # then add defer to sync to revision
        return d
1164573
def delete(self, timeout=-1, custom_headers=None, force=False):
        
        uri = self.data['uri']

        logger.debug("Delete resource (uri = %s)" % (str(uri)))

        return self._helper.delete(uri, timeout=timeout,
                                   custom_headers=custom_headers, force=force)
402715
def _deleter(self, uri, headers):
        

        # perform Object HEAD request
        resp = self.http.delete(url=uri, headers=headers)
        self._resp_exception(resp=resp)
        return resp
1352771
def delete(self, request, uri):
        
        uri = self.decode_uri(uri)
        uris = cio.delete(uri)

        if uri not in uris:
            raise Http404

        return self.render_to_response()
1057412
def _delete(self, url, **kwargs):
        

        response = retry_request(self)(self._http_delete)(url, **kwargs)

        if self.raw_mode:
            return response

        if response.status_code >= 300:
            error = get_error(response)
            if self.raise_errors:
                raise error
            return error

        return response
47346
def delete(self, url: StrOrURL, **kwargs: Any) -> '_RequestContextManager':
        """"""
        return _RequestContextManager(
            self._request(hdrs.METH_DELETE, url,
                          **kwargs))