/**
  * {@inheritDoc}
  */
 public function delete(Filesystem $remote, array $options = array())
 {
     if (!$remote instanceof Directory) {
         throw new \InvalidArgumentException(sprintf("Invalid filesystem given, expected instance of Directory got %s", get_class($remote)));
     }
     if (!isset($options[FTP::RECURSIVE]) || true !== $options[FTP::RECURSIVE]) {
         throw new \InvalidArgumentException("Invalid option given. Expected true as FTP::RECURSIVE parameter");
     }
     $this->deleteFiles($remote);
     $this->deleteDirectories($remote, $options);
     $this->wrapper->rmdir($remote->getRealpath());
     return true;
 }