original_string: public function delete($filePath)
      {
          $relativePath = $this->fs->makePathRelative($filePath, $this->root);
          if (preg_match('!(^|/)\.\.!', $relativePath)) {
              throw new \RuntimeException("{$relativePath} does not seem to be managed by the filemanager");
          }
          if ($this->fs->exists($filePath)) {
              $this->fs->remove($filePath);
              $this->dispatchEvent(ResourceEvent::DELETED, $filePath);
              return true;
          }
          return false;
      }
code: public function delete($filePath)
      {
          $relativePath = $this->fs->makePathRelative($filePath, $this->root);
          if (preg_match('!(^|/)\.\.!', $relativePath)) {
              throw new \RuntimeException("{$relativePath} does not seem to be managed by the filemanager");
          }
          if ($this->fs->exists($filePath)) {
              $this->fs->remove($filePath);
              $this->dispatchEvent(ResourceEvent::DELETED, $filePath);
              return true;
          }
          return false;
      }
code_tokens: public function delete ( $ filePath ) { $ relativePath = $ this -> fs -> makePathRelative ( $ filePath , $ this -> root ) ; if ( preg_match ( '!(^|/)\.\.!' , $ relativePath ) ) { throw new \ RuntimeException ( "{$relativePath} does not seem to be managed by the filemanager" ) ; } if ( $ this -> fs -> exists ( $ filePath ) ) { $ this -> fs -> remove ( $ filePath ) ; $ this -> dispatchEvent ( ResourceEvent :: DELETED , $ filePath ) ; return true ; } return false ; }
docstring: Delete a file path
  
  @param string $filePath
  @return bool
docstring_tokens: Delete a file path