/**
  * {@inheritDoc}
  */
 public function delete(Filesystem $remote, array $options = array())
 {
     if (!$remote instanceof File) {
         throw new \InvalidArgumentException(sprintf("Invalid filesystem given, expected instance of File got %s", get_class($remote)));
     }
     if (null === $this->manager->findFileByFile($remote)) {
         throw new DirectoryException(sprintf("Could not locate file %s", $remote->getRealpath()));
     }
     $this->wrapper->delete($remote->getRealpath());
     return true;
 }
 /**
  * Deletes files in a directory
  *
  * @param string $path /remote/path/
  */
 private function deleteFiles(Directory $path)
 {
     foreach ($this->manager->findFiles($path) as $file) {
         $this->wrapper->delete($file->getRealpath());
     }
 }