Close the download manager

@param {boolean} force
Force the closing of the DM window
547458
function downloadManager_close(force) {
    var windowCount = mozmill.utils.getWindows().length;

    if (this._controller) {
      // Check if we should force the closing of the DM window
      if (force) {
        this._controller.window.close();
      } else {
        var cmdKey = utils.getEntity(this.getDtds(), "cmd.close.commandKey");
        this._controller.keypress(null, cmdKey, {accelKey: true});
      }

      this._controller.waitForEval("subject.getWindows().length == " + (windowCount - 1),
                                   gTimeout, 100, mozmill.utils);
      this._controller = null;
    }
  }
47869
function(view, force) {
    var parentViews;
    // Shorthand the managers for easier access.
    var manager = view.__manager__;
    var rentManager = manager.parent && manager.parent.__manager__;
    // Test for keep.
    var keep = typeof view.keep === "boolean" ? view.keep : view.options.keep;

    // In insert mode, remove views that do not have `keep` attribute set,
    // unless the force flag is set.
    if ((!keep && rentManager && rentManager.insert === true) || force) {
      // Clean out the events.
      LayoutManager.cleanViews(view);

      // Since we are removing this view, force subviews to remove
      view._removeViews(true);

      // Remove the View completely.
      view.$el.remove();

      // Cancel any pending renders, if present.
      view._cancelQueuedRAFRender();

      // Bail out early if no parent exists.
      if (!manager.parent) { return; }

      // Assign (if they exist) the sibling Views to a property.
      parentViews = manager.parent.views[manager.selector];

      // If this is an array of items remove items that are not marked to
      // keep.
      if (_.isArray(parentViews)) {
        // Remove duplicate Views.
        _.each(_.clone(parentViews), function(view, i) {
          // If the managers match, splice off this View.
          if (view && view.__manager__ === manager) {
            aSplice.call(parentViews, i, 1);
          }
        });
        if (_.isEmpty(parentViews)) {
          manager.parent.trigger("empty", manager.selector);
        }
        return;
      }

      // Otherwise delete the parent selector.
      delete manager.parent.views[manager.selector];
      manager.parent.trigger("empty", manager.selector);
    }
  }
281451
function ( force ) {

        if( !R.needReZone && !force ) return;

        var i = R.ui.length, u;

        while( i-- ){ 

            u = R.ui[i];
            R.getZone( u );
            if( u.isGui ) u.calcUis();

        }

        R.needReZone = false;

    }
320555
public void delete(boolean forceDelete) throws APIException {
        HttpResponse response = client.delete(getUrl() + "?force=" + forceDelete);
        HttpClientHelpers.throwIfNotOk(response);
    }
687954
public static void forceDelete(File file) {
        if (file.exists()) {

            // If the File instance to delete is a directory, delete all it's
            // contents.
            if (file.isDirectory()) {
                for (File contentFile : file.listFiles()) {
                    forceDelete(contentFile);
                }
            }

            if (file.delete()) {
                log.d("File " + file.getPath() + " was succesfully deleted.");
            } else {
                log.w("File " + file.getPath() + " couldn't be deleted.");
            }
        }
    }
756371
async def destroy(self, force=False):
        
        facade = client.ClientFacade.from_connection(self.connection)

        log.debug(
            'Destroying machine %s', self.id)

        await facade.DestroyMachines(force, [self.id])
        return await self.model._wait(
            'machine', self.id, 'remove')
1274448
function downloadManager_open(controller, shortcut) {
    if (shortcut) {
      if (mozmill.isLinux) {
        var cmdKey = utils.getEntity(this.getDtds(), "downloadsUnix.commandkey");
        controller.keypress(null, cmdKey, {ctrlKey: true, shiftKey: true});
      } else {
        var cmdKey = utils.getEntity(this.getDtds(), "downloads.commandkey");
        controller.keypress(null, cmdKey, {accelKey: true});
      }
    } else {
      controller.click(new elementslib.Elem(controller.menus["tools-menu"].menu_openDownloads));
    }

    controller.sleep(500);
    this.waitForOpened(controller);
  }
1021294
function(force) {
        OpenLayers.Handler.Path.prototype.destroyFeature.call(
            this, force);
        this.polygon = null;
    }
248461
public void forceCloseAndDelete() {
    try {
      if (objectOutputStream != null) {
        objectOutputStream.close();
        objectOutputStream = null;
      }
      if (fileOutputStream != null) {
        fileOutputStream.close();
        fileOutputStream = null;
      }
    } catch (IOException e) {
      log.debug(e);
    }
    closed = true;
    tokenNumber = 0;
    if (file != null) {
      if (file.exists() && file.canWrite() && !file.delete()) {
        log.debug("couldn't delete " + file.getName());
      }
      file = null;
    }
  }
556425
public base_response forcehasync(Boolean force, String save) throws Exception
	{
		hasync resource = new hasync();
		resource.set_force(force) ;
		resource.set_save(save);
		options option = new options();
		option.set_action("force");
		base_response result = resource.perform_operation(this,option);
		return result;
	}
1301746
public function clearCommand($force = null)
    {
        $this->initialize();
        $this->backupService->removeAllBackups();
        if ( $force===true ) {
            $this->backupService->removeKeyfile();
        }
    }
201292
def close_umanager(self, force=False):
        
      
        if not (force or self.umanager_opened):
            return
        # make sure we've got a fresh prompt
        self.ser.write(self.cr)
        if self.read_loop(lambda x: x.endswith(self.umanager_prompt),self.timeout):
            self.ser.write(''.join((self.cmd_umanager_termination,self.cr)))
            if self.read_loop(lambda x: x.endswith(self.buf_on_exit),self.timeout):
                log.debug("uManager closed")
            else:
                raise Dam1021Error(2,"Failed to close uManager")
        else:
            log.debug("uManager already closed")
            
        self.umanager_opened = False
829348
function(force) {
        OpenLayers.Handler.Point.prototype.destroyFeature.call(
            this, force);
        this.line = null;
    }
758495
public function forceDownload($filename = null, $filemime = 'application/octet-stream')
    {
        // Force mime
        $this->filemime = $filemime;
        $this->download($filename);
    }
179852
def destroy(force = false)
      delete_bucket
      true
    rescue Error::BucketNotEmpty
      if force
        objects.destroy_all
        retry
      else
        raise
      end
    end
678637
def close(self):
        
        self.save()
        self.manager.remove_temp()
        self.cfb.close()
        self.is_open = False
        self.f.close()
779233
public void forceClose() {
        // Move all elements from usedInstances to unusedInstances in a threadsafe way
        for (final T usedInstance : new ArrayList<>(usedInstances)) {
            if (usedInstances.remove(usedInstance)) {
                unusedInstances.add(usedInstance);
            }
        }
        close();
    }