public function isDirectory($key) { try { $metadata = $this->getDropboxMetadata($key); } catch (Exception\FileNotFound $e) { return false; } return (bool) isset($metadata['is_dir']) ? $metadata['is_dir'] : false; }