Remove a photo from the collection. If the photo is not in the collection,
 this action has no effect.
 @param [Unsplash::Photo] The photo to remove.
 @return [Boolean] +true+ on success.
322584
def remove(photo)
      response = connection.delete("/collections/#{id}/remove", photo_id: photo.id)
      (200..299).include?(response.status)
    end
1368273
def destroy
      @image.destroy
  
      respond_to do |format|
        format.html { redirect_to images_url }
        format.json { head :ok }
      end
    end
658188
def users_deletePhoto(self, **kwargs) -> SlackResponse:
        """"""
        self._validate_xoxp_token()
        return self.api_call("users.deletePhoto", http_verb="GET", params=kwargs)
177297
def delete(type, hash)
      raise Dis::Errors::ReadOnlyError if readonly?
      delete!(type, hash)
    end
382119
def delete_image(self, image_id):
        
        url = self.api_url + '/api/images/' + image_id
        response = self._request_url(url, 'delete', with_access_token=True)
        headers, result = self._parse_and_check(response)
        return Image.from_dict(result)
53651
function (request, response) {
    if (request.querystring.action === 'delete') {
      this.photo.delete.apply(this, arguments)
    } else if (request.querystring.action === 'put') {
      this.photo.put.apply(this, arguments)
    } else {
      response.serveJSON()
    }
  }
183151
def delete(self, photo_id, album_id=0):
        
        if isinstance(photo_id, Info):
            photo_id = photo_id.id
        return self._session.okc_post('photoupload', data={
            'albumid': album_id,
            'picid': photo_id,
            'authcode': self._authcode,
            'picture.delete_ajax': 1
        })
199116
def delete(tuple)
      key = bin_key(tuple)
      bin = @hash[key]
      return nil unless bin
      bin.delete(tuple)
      @hash.delete(key) if bin.empty?
      tuple
    end
1141188
protected function delete_image() {
    $presets = $this->get_presets();

    foreach ($presets as $key => $preset) {
      $file_name = $this->imagecache_path . $key .'/'. $this->file_name;
      if (File::exists($file_name)) {
        File::delete($file_name);
      }
    }
  }
344879
def unmount
      return nil unless mounted?
      if system "/sbin/umount '#{@mountpoint}'"
        sleep 1 # the umount takes time.
        @mountpoint.rmdir if @mountpoint.directory? and (not @mountpoint.mountpoint?)
        @mounted = false
      else
        raise  JSS::FileServiceError ,"There was a problem unmounting #{@mountpoint}"
      end
      nil
    end
1189616
public function deleteImageFile()
    {
        if ($this->hasCategory('photo') || $this->hasCategory('thetas')) {
            // Get thumbnail path
            $path = __DIR__."/../../../web/media/cache/thumbnail"
                    .$this->getImage();

            // Delete file if exists
            if (is_file($path)) {
                unlink($path);
            }
        }
    }
1076709
def delete(collection)
    each_resource_with_edit_url(collection) do |resource, edit_url|
      connection.delete(edit_url, 'If-Match' => "*")
    end
    # return count
    collection.size
  end
795881
public void delete(String photoId) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_DELETE);

        parameters.put("photo_id", photoId);

        // Note: This method requires an HTTP POST request.
        Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        // This method has no specific response - It returns an empty
        // sucess response if it completes without error.
    }
1155771
def replace(self, photo_file, **kwds):
        
        result = self._client.photo.replace(self, photo_file, **kwds)
        self._replace_fields(result.get_fields())
1260355
public function actionPhotosDelete()
    {
        $request = Yii::$app->request;
        $photoIds = $request->post('ids'); // Array or selected records primary keys
        $photoModels = GalleryPhoto::findAll($photoIds);
        if(empty($photoModels)) return null;
        $galleryModel = $this->findModel($photoModels[0]->gallery_id);
        $dir = Yii::getAlias('@app/web/img/gallery/' . Translator::rus2translit($galleryModel->name));
        foreach ($photoModels as $photo){
            try{
                unlink($dir . '/' . $photo->name);
                unlink($dir . '/thumb/' . $photo->name);
            } catch (\Exception $e){
                echo('Не удалось удалить файл ' . $photo->name . ' - ' . $e->getMessage());
            }
        }
        GalleryPhoto::deleteAll(['photo_id' => $photoIds]);

        if ($request->isAjax) {
            Yii::$app->response->format = Response::FORMAT_JSON;
            return true;
        } else {
            return $this->redirect(['index']);
        }

    }
70914
def delete_image
      image = Image.find_by_id(params[:id])
      image.remove_asset = true
      image.save
      CarrierWave.clean_cached_files!
      head :ok
    end
149890
function (camera) {
        var idx = this._cameraList.indexOf(camera);
        if (idx >= 0) {
            this._cameraList.splice(idx, 1);
        }
        this._cameraList.unshift(camera);
    }