And if deleting don't do so
547431
public function onBeforeDelete() {
        $store = $this->targetStore();
        if (strlen($store)) {
            Config::inst()->update('File', 'update_filesystem', false);
        }

		parent::onBeforeDelete();
    }
912204
protected function beforeDelete() {
	
		// delete plugin folder
		$plugin = $this->getPlugin();
		$res = Utilities::deleteFolder($plugin->baseFolder);
	
		$app = Application::getInstance();
		
		if ($res) {
				
			$app->logEvent('Plugin folder ' . $plugin->baseFolder . ' has been deleted');
		
		} else {
				
			if (is_dir($plugin->baseFolder)) {
				$app->logWarning('Plugin folder ' . $plugin->baseFolder . ' has not been deleted due unexpected error');
			} else {
				$app->logWarning('Plugin folder ' . $plugin->baseFolder . ' has not been found');
			}
		}

		// deletes object dependances
		$rules = Rule::getAllObjects(array('moduleId' => $this->id));
		foreach ($rules as $rule) {
			$rule->delete();
		}
		
	}
772478
public function beforeDelete()
    {
        $this->invites()->sync(array());
        $this->deletePages();
        $this->deletePosts();
        $this->deleteEvents();
        $this->deleteComments();
    }
268683
public void delete() {
        if (!file.delete()) {
            Storage.LOG.WARN("Failed to delete data file for object %s (%s).", getName(), file.getAbsolutePath());
        }
        if (!getPropertiesFile().delete()) {
            Storage.LOG.WARN("Failed to delete properties file for object %s (%s).",
                    getName(),
                    getPropertiesFile().getAbsolutePath());
        }
    }
580967
def do_quit(self, arg):
        """"""
        if self.saved:
            self.save()
        else:
            self.parser.clean()
        return True
1161051
public function delete()
    {
        if (!$this->allow_delete) {
            throw $this->exception('Deleting is not allowed');
        }

        $m = $this->model;
        if (!$m->loaded()) {
            throw $this->exception('Cowardly refusing to delete all records');
        }

        $m->delete();

        return true;
    }
1192782
def _must_be_deleted(local_path, r_st):
        """"""
        # if the file doesn't exists
        if not os.path.lexists(local_path):
            return True

        # or if the file type is different
        l_st = os.lstat(local_path)
        if S_IFMT(r_st.st_mode) != S_IFMT(l_st.st_mode):
            return True

        return False
1270923
@InterfaceAudience.Public
    public boolean isDeletion() {
        Object deleted = getProperty("_deleted");
        if (deleted == null) {
            return false;
        }
        Boolean deletedBool = (Boolean) deleted;
        return deletedBool.booleanValue();
    }
995090
public function delete()
    {
        if (!$this->_canKept) {
            $this->forceDelete();
        } else {
            Query::table(static::$table)
            ->set('deleted_at', Time::current())
            ->where($this->_keyName, '=', $this->_keyValue)
            ->update();
        }
    }
405819
public function beforeDelete()
    {
        foreach ($this->attributes as $attr => $options) {
            $this->ensureAttribute($attr, $options);
            $this->deleteFiles($attr);
        }
    }
641909
public function preRemove()
    {
        if ($this->lifecycleEventsActive && $this->deleted === false) {
            $this->resourceManager->deleteResource($this);
        }
    }
995637
def forget(self, key):
        
        if key in self._storage:
            del self._storage[key]

            return True

        return False
135606
public final Boolean isDeleted() {
        Boolean deleted = getObject(DELETED_CONST, Boolean.class);
        return deleted != null ? deleted : false;
    }
687527
public function afterDelete()
    {
        if ($this->cachedDeletedId) {
            foreach (NavItemPageBlockItem::find()->where(['block_id' => $this->cachedDeletedId])->all() as $item) {
                $item->delete();
            }
        }
        parent::afterDelete();
    }
1337610
@Override
    public void doExecute() {
        if (!getEditor().isReadOnly()) {
            deleted = getEditor().delete().charAt(0);
            getEditor().put(replace);
            getEditor().moveLeft(replace.length());
        }
    }
1240477
private List<String> checkDeletions(List<String> deletes) {
        List<String> failedObjects = new ArrayList<String>();
        for (String delete : deletes) {
            if (!checkIfActiveOidExisting(delete)) {
                failedObjects.add(delete);
            }
        }
        return failedObjects;
    }
1226489
public function delete() {
		if ($this->isDirectory()) {
			$this->manager->deleteDir($this->getUrl());
		} else {
			$this->manager->delete($this->getUrl());
		}
	}