protected function _deleteFile(Event $event) {
		try {
			$this->_beforeDeleteFile($event);
			$entity = $event->getData('entity');
			$path = $this->pathBuilder()->fullPath($entity);

			if ($this->getStorageAdapter($entity->adapter)->delete($path)) {
				$event->result = true;
				$event->setData('path', $path);
				$event->setData('entity', $entity);
				$this->_afterDeleteFile($event);

				return true;
			}
		} catch (\Exception $e) {
			$this->log($e->getMessage(), LogLevel::ERROR, ['scope' => ['storage']]);
			throw new StorageException($e->getMessage(), $e->getCode(), $e);
		}

		return false;
	}
protected function _deleteFile(Event $event) {
		try {
			$this->_beforeDeleteFile($event);
			$entity = $event->getData('entity');
			$path = $this->pathBuilder()->fullPath($entity);

			if ($this->getStorageAdapter($entity->adapter)->delete($path)) {
				$event->result = true;
				$event->setData('path', $path);
				$event->setData('entity', $entity);
				$this->_afterDeleteFile($event);

				return true;
			}
		} catch (\Exception $e) {
			$this->log($e->getMessage(), LogLevel::ERROR, ['scope' => ['storage']]);
			throw new StorageException($e->getMessage(), $e->getCode(), $e);
		}

		return false;
	}
protected function _deleteFile ( Event $ event ) { try { $ this -> _beforeDeleteFile ( $ event ) ; $ entity = $ event -> getData ( 'entity' ) ; $ path = $ this -> pathBuilder ( ) -> fullPath ( $ entity ) ; if ( $ this -> getStorageAdapter ( $ entity -> adapter ) -> delete ( $ path ) ) { $ event -> result = true ; $ event -> setData ( 'path' , $ path ) ; $ event -> setData ( 'entity' , $ entity ) ; $ this -> _afterDeleteFile ( $ event ) ; return true ; } } catch ( \ Exception $ e ) { $ this -> log ( $ e -> getMessage ( ) , LogLevel :: ERROR , [ 'scope' => [ 'storage' ] ] ) ; throw new StorageException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } return false ; }
Deletes the file from the configured storage backend.

@param \Cake\Event\Event $event
@return bool
@throws \Burzum\FileStorage\Storage\StorageException
Deletes the file from the configured storage backend .