public function isDirectory($key) { $this->initialize(); $url = $this->sftp->getUrl($this->computePath($key)); return is_dir($url); }