Deletes all charts.

@return string Returns the file path.
@throws Exception
10673
public function deleteCharts()
    {
        //check whether workshett name is set or not
        if ($this->worksheetName == '')
            throw new Exception('Worksheet name not specified');
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/charts/';
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'DELETE', '', '');
        $v_output = Utils::validateOutput($responseStream);
        if ($v_output === '') {
            //Save doc on server
            $folder = new Folder();
            $outputStream = $folder->GetFile($this->getFileName());
            $outputPath = AsposeApp::$outPutLocation . $this->getFileName();
            Utils::saveFile($outputStream, $outputPath);
            return $outputPath;
        } else
            return $v_output;
    }
317993
protected function deleteTables()
    {
        if (empty( self::$tables )) {
            throw new \Exception('Cannot delete tables, as no configuration file given, or the ::$tables is not overridden.');
        }
        $client = $this->dynamoDb->getClient();

        $defaultAnswer = $this->input->getOption('yes');
        $a = 'n';
        foreach (self::$tables as $tableData) {
            $tableName = $tableData['TableName'];

            if ($this->tableExists($tableName)) {

                if ($defaultAnswer === false) {
                    $a = $this->ask(sprintf('Are you sure you want to delete table "%s"? [y/N]', $tableName), 'n');
                }

                if ($defaultAnswer || strtolower($a) === 'y') {
                    // Reset the answer.
                    $a = null;
                    $this->comment(sprintf('Deleting table "%s"', $tableName));

                    $client->deleteTable([
                        'TableName' => $tableName,
                    ]);
                    $client->waitUntil('TableNotExists', ['TableName' => $tableName]);

                    $this->info('Table deleted.');
                } else {
                    $this->comment(sprintf('Skipping table %s', $tableName));
                }
            } else {
                $this->warn(sprintf('Table "%s" does not exist.', $tableName));
            }
        }
    }
1221264
public function delete()
    {
        if (!$this->hasRequestParameter('uri') || !$this->hasRequestParameter('path') || !$this->hasRequestParameter('lang')) {
            throw new common_exception_MissingParameter();
        }

        $item = $this->getResource($this->getRequestParameter('uri'));
        $itemLang = $this->getRequestParameter('lang');

        $resolver = new ItemMediaResolver($item, $itemLang);
        $asset = $resolver->resolve($this->getRequestParameter('path'));
        $deleted = $asset->getMediaSource()->delete($asset->getMediaIdentifier());

        return $this->returnJson(array('deleted' => $deleted));
    }
1227352
protected function cleanUp()
    {
        $this->fs->remove(dirname($this->downloadedFilePath));

        try {
            $licenseFile = array($this->projectDir.'/LICENSE');
            $upgradeFiles = glob($this->projectDir.'/UPGRADE*.md');
            $changelogFiles = glob($this->projectDir.'/CHANGELOG*.md');

            $filesToRemove = array_merge($licenseFile, $upgradeFiles, $changelogFiles);
            $this->fs->remove($filesToRemove);
        } catch (\Exception $e) {
            // don't throw an exception in case any of the Symfony-related files cannot
            // be removed, because this is just an enhancement, not something mandatory
            // for the project
        }

        return $this;
    }
520431
public function delete() {

		if(@unlink($this->getPath())) {
			$this->deleteCacheEntries();
			self::unsetInstance($this->getPath());
		}
		else {
			throw new FilesystemFileException("Delete of file '{$this->getPath()}' failed.", FilesystemFileException::FILE_DELETE_FAILED);
		}

	}
1130115
public function deleteCorruptedUrlAliases()
    {
        $this->transactionHandler->beginTransaction();
        try {
            $totalCount = $this->gateway->deleteUrlAliasesWithoutLocation();
            $totalCount += $this->gateway->deleteUrlAliasesWithoutParent();
            $totalCount += $this->gateway->deleteUrlAliasesWithBrokenLink();

            $this->transactionHandler->commit();

            return $totalCount;
        } catch (\Exception $e) {
            $this->transactionHandler->rollback();
            throw $e;
        }
    }
953983
public function delete()
    {
        $log_file = glob($this->path.'/log-'.$this->sapi.'*-'.$this->date.'.txt');

        if (!empty($log_file)) {
            return File::delete($log_file[0]);
        }
    }
791674
public function deleteResource()
    {
        if (!$this->isXmlHttpRequest() || !$this->hasRequestParameter('id')) {
            throw new common_exception_BadRequest('wrong request mode');
        }

        $id = $this->getRequestParameter('id');

        // Csrf token validation
        $this->validateCsrf();
        $this->validateInstanceRoot($id);

        $this->signatureValidator->checkSignature(
            $this->getRequestParameter('signature'),
            $id
        );

        $resource = $this->getResource($this->getRequestParameter('id'));
        $deleted = $this->getClassService()->deleteResource($resource);
        return $this->returnJson(array(
            'deleted' => $deleted
        ));
    }
841463
protected function deleteResamplings() {
        $children = ContentServiceAsset::get()->filter('SourceID', $this->ID);

        $numDeleted = 0;
        foreach ($children as $child) {
            $child->SourceID = -1;

            // we _DONT_ do a hard delete; if content has this image cached, it should be able to
            // hold it for a while. Instead, mark deleted and allow a cleanup job to collect it later
            $child->Filename = 'deleted';
            $child->write();
            $numDeleted++;
        }

        $this->Resamplings = array();
        return $numDeleted;
    }
1225096
public function deleteIndexes()
    {
        try {
            return TypeConverter::toLegacy($this->collection->dropIndexes());
        } catch (\MongoDB\Driver\Exception\Exception $e) {
            return ExceptionConverter::toResultArray($e);
        }
    }
226595
public function deleteAll()
    {
        try {
            array_map('unlink', glob($this->filePath('*')));
        } catch (\Exception $e) {
            return false;
        }
        $this->storage = [];
        return true;
    }
714997
public function delete()
    {
        if (!$this->isXmlHttpRequest()) {
            throw new \Exception("wrong request mode");
        }

        $deleted = $this->getClassService()->deleteInstance($this->getCurrentInstance());

        $this->returnJson(array(
            'deleted' => $deleted
        ));
    }
1162962
public function delete()
	{
		try 
		{
			unlink($this->getName());
			return self::FILE_DELETE_SUCCESS;
		} 
		catch (Exception $e) 
		{
			return self::FILE_DELETE_ERROR;
		}
	}
641338
public function deleteStorgaFile()
    {
        if (!$this->onDeleteCascade) {
            return $this;
        }


        if ($this->relations) {
            foreach ($this->relations as $data) {
                $fieldName = ArrayHelper::getValue($data, 'property');

                if ($fileIds = $this->owner->{$fieldName}) {
                    if ($storageFiles = CmsStorageFile::find()->where(['id' => $fileIds])->all()) {
                        foreach ($storageFiles as $file) {
                            $file->delete();
                        }

                    }
                }
            }
        }

        if ($this->fields) {
            foreach ($this->fields as $fieldName) {

                if ($fileIds = $this->owner->{$fieldName}) {
                    if ($storageFiles = CmsStorageFile::find()->where(['id' => $fileIds])->all()) {
                        foreach ($storageFiles as $file) {
                            $file->delete();
                        }
                    }
                }
            }
        }

    }
1194271
public function deleteAll()
    {
        $response = [
            'success' => true,
            'deleted' => []
        ];
        if (!$this->isXmlHttpRequest()) {
            throw new common_exception_BadRequest('wrong request mode');
        }

        // Csrf token validation
        $this->validateCsrf();

        $ids = [];

        foreach ($this->getRequestParameter('ids') as $id) {
            $ids[] = $id['id'];
        }

        $this->signatureValidator->checkSignatures($this->getRequestParameter('ids'));

        $this->validateInstancesRoot($ids);

        foreach ($ids as $id) {
            $deleted = false;
            try {
                if ($this->hasWriteAccess($id)) {
                    $resource = new \core_kernel_classes_Resource($id);
                    if ($resource->isClass()) {
                        $deleted = $this->getClassService()->deleteClass(new \core_kernel_classes_Class($id));
                    } else {
                        $deleted = $this->getClassService()->deleteResource($resource);
                    }
                }
            } catch (\common_Exception $ce) {
                \common_Logger::w('Unable to remove resource ' . $id . ' : ' . $ce->getMessage());
            }
            if ($deleted) {
                $response['deleted'][] = $id;
            }
        }

        return $this->returnJson($response);
    }
235374
public function deleteFiles()    {
        $fileName = $this->_model->{$this->attribute};
        if (! empty($fileName)) {

            $size = $this->cropSize;

            if ($this->sizeSteps && $size > 0)    {
                $minSize = $size >> ($this->sizeSteps - 1);
                while ($size >= $minSize)  {
                    $path = $this->imgBaseDir . DIRECTORY_SEPARATOR . $size . DIRECTORY_SEPARATOR . $fileName;
                    if (file_exists($path)) unlink($path);

                    $size >>= 1;
                }
            }
            else    {
                $path = $this->imgBaseDir . DIRECTORY_SEPARATOR . $fileName;
                if (file_exists($path)) unlink($path);
            }
            $this->_model->{$this->attribute} = null;
            if (! is_numeric($this->aspectRatio)) $this->_model->{$this->aspectRatio} = null;
        }
    }
1288053
public function deleteFile()
    {
        if ($this->file) {
            if (file_exists($this->file)) {
                if (false === @unlink($this->file)) {
                    throw FileException::lastError();
                }
            }

            if (file_exists($this->file . '.pubkey')) {
                if (false === @unlink($this->file . '.pubkey')) {
                    throw FileException::lastError();
                }
            }

            $dir = dirname($this->file);

            if (file_exists($dir)) {
                if (false === @rmdir($dir)) {
                    throw FileException::lastError();
                }
            }

            $this->file = null;
        }
    }