public function removeDir($dir) { if (file_exists($path = "ssh2.sftp://{$this->sftp}{$dir}")) { $this->protect('rmdir', [$path]); } }